Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

2012-03-09

Data compression and archiving

An archive file is a file containing several files and directories.

bzip2 -d filename
decompress archive file

tar -xvf filename
extract

tar -cvf filename dir ...
create

tar -zcvf filename dir ...
create a zipped tar file

2012-03-08

Disk Usage (du)

du -h
human readable option - displaying output in kilobytes (K), megabytes (M) and gigabytes (G) rather than just in the default kilobytes

du -sh
summary option - report only the total disk space occupied by a directory tree and to suppress individual reports for its subdirectories