Linux filmanipulation

Tar.gz:

Create tar.gz:
tar -zcvf archive_name.tar.gz directory_to_compress

List contents of tar.gz:
tar -ztvf www.foredragsholderen.dk.tar.gz

Unpack tar.gz:

tar -zxvf archive_name.tar.gz

This will extract the files in the archive_name.tar.gz archive in the current directory. Like with the tar format you can optionally extract the files to a different directory:

# tar -zxvf archive_name.tar.gz -C /tmp/extract_here/


The nessasary prompt jibberish to rename JPG files to jpg files. for f in *.JPG; do mv $f `echo $f | tr ‘[:upper:]’ ‘[:lower:]’`; done

And that is more or less the same as the command “rename .JPG .jpg *”.

Even more Gibberish for making photoalbums. for f in *.jpg; do cp ../picsdesc.txt `echo $f | cut -b1-8`’.txt’; done

 

 

find . -name \*.oio -exec mv {} ../oldcrap/ \;

 

for f in *.dat; do mv $f `echo $f | cut -f 1 -d “.”`’.csv’; done

cat event_DBP_GENEVA_TM_0000* | grep Event | cut -d \” -f 2 | sort -n | uniq -u > uniquenumbers.txt

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Siden før kendt som "SKRID, Lukket server"