3/31/2024 0 Comments Zip folder ubuntu![]() ![]() The gzip command will not recursively compress a directory into a single zip file, when using the -r switch. Tar has many, many, MANY other options and uses as well I heartily recommend reading through its manpage sometime. That command is effectively the same as gunzip < | tar -xv To decompress and unpack the archive into the current directory you would use tar -zxvf The command above is effectively the same as tar -cv directory | gzip > The gzip command/lib is completely separate. The tar command offers gzip support (via the -z flag) purely for your convenience. V (verbosely) list (on /dev/stderr so it doesn't affect piped commands) all the files it adds to the archive.Īnd store the output as a f (file) named In order to "zip" a directory, the correct command would be tar -zcvf directory/Ĭ (create) an archive from the files in directory ( tar is recursive by default) Unlike zip, gzip functions as a compression algorithm only.īecause of various reasons some of which hearken back to the era of tape drives, Unix uses a program named tar to archive data, which can then be compressed with a compression program like gzip, bzip2, 7zip, etc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |