Using tar to zip/unzip files
Extract files from a tar file (see x in the arguments).
$ tar -xvf foo.tarExtract gz compressed tarball.
$ tar -xvzf foo.tar.gz
$ tar -xvzf foo.tgztar seems to work without z as well.
$ tar -xvf foo.tar.gzExtract one file.
$ tar -xvzf foo.tgz onefile.phpCreat a tar file and zip it (see c in the arguments).
(tar allows arguments with no dash for historical reason)
$ tar cvzf foo.tgz *.php *.txt
$ tar cvzf foo.tgz mydirectoryCategory:
Post new comment