Tag Archives: Terminal

Downloading a merging a .ts stream in OS X

Another brain dump to help me remember if I need to do this again.

Install wget

Install and make wget, information taken and updated from another blog.

curl -O http://ftp.gnu.org/gnu/wget/wget-1.18.tar.gz

tar -xzf wget-1.18.tar.gz

cd wget-1.18

./configure --with-ssl=openssl

make

sudo make install

cd .. && rm -rf wget*

Download video

Find file location in Safari’s Page Resources, then use with wget

wget -r http://filelocation/filename_{1..999}.ts

Merge files

cat filename_?.ts filename_??.ts filename_???.ts > all.ts

 

diff

Another command I want to write down, like dot_clean, so that I remember the details:
diff – Compare files line by line.
Usage: diff [OPTION]… FILES
FILES are `FILE1 FILE2′ or `DIR1 DIR2′ or `DIR FILE…’ or `FILE… DIR’.

diff -rq folder1 folder2

e.g. -r (rekursive) and -q (brief output)

diff -rq /Users/memm/Backup/Documents/ /Volumes/Documents/

dot_clean

I keep forgetting this command – I just don’t use it often enough, so I thought I write it down to make it easier to find. I need it when I copy mp3 files to a SD card for the car.

The command to delete hidden system files in OS X is:

dot_clean folder/

Just to spell it out, you can see all files (including hidden ones) using:

ls -a