Today my boss ask me to move entire directories to another server. If i copy file by file, i think my boss will kill me immediately. What i need is a zip command in unix / linux environment. Ya, i remember tar command.
1) Ok first i need to know the usage of tar command.
man tar
or
tar --help
2) Basic tar command only involve 5 options c, z, f, v, x
c = create a new tar file
v = verbose , display file to compress or uncompress
f = create the tar file with filename provided as the argument
z = use gzip to zip it
x = extract file
3) Compress / zip it with command tar -cvzf tarname.tar.gz folder
For example i want to compress and tar a folder name “scheduler”.
$ tar -cvzf scheduler.tar.gz scheduler
4) UnCompress it / unzip it with command tar -xzvf tarname.tar.gz
uncompress it or unzip scheduler.tar.gz.
$ tar -xvzf scheduler.tar.gz
5)Done ~ simple enough


[...] More detail about tar command [...]