I’m so tired of googling this. The reason I have to look it up every-damn-time is because I can never remember exactly what the switches are for compressing/uncompressing.
The following was taken from here.
Create Archive:[note color=”#DDD”]
tar -zcvf example.tar.gz /home/example[/note]
- -z: Compress archive using gzip program
- -c: Create archive
- -v: Verbose i.e display progress while creating archive
- -f: Archive File name
Extract Files:[note color=”#DDD”]
tar -zxvf example.tar.gz[/note]
- I’m guessing that -x means extract
Extract to a specific directory:[note color=”#DDD”]
tar -zxvf example.tar.gz -C /tmp[/note]