![]() ![]() However, if you must, using those commands from the command line is fine. Using this, you can compress and decompress the. Best to have a habit of using -d or -decompress instead of unxz as well. To tar a folder in Linux, users can execute the tar cf Filename.tar Directory/Folder to Archive command. The docs recommend this in case you are using this for scripting. This is done using the -I argument to tar, which tells tar what program to use to compress the. It does so by specifying the arguments to be passed to the xz subprocess, which compresses the tar archive. Note: unlike Rafael's answer, use xz -dc instead of catxz. tar -c -I xz -9 -T0 -f list of files and folders This compresses a list of files and directories into an. To echo Rafael van Horn, to uncompress & untar (see note below): xz -dc | tar x ![]() z to manually set xz to zip, though it defaults to zipping if not otherwise directed. I often use -k to -keep the original file and -9 for really heavy compression. Where -4e is, use your own compression options. > directs the tarred and compressed file to.xz -4e calls xz with the -4e compression option.f reads from a directory (best to put this second because -cf != -fc) 6 Answers Sorted by: 14 You can try the -remove-files argument to tar.c creates a new archive for the specified files.The tar command will collate all the files into one archive file. Tar cf - filename | xz -4e > īecause I liked Wojciech Adam Koszek's format, but not information: Instead of trying to compress the folder directly, you should use tar on it first. If you want to use compression options for xz, or if you are using tar on MacOS, you probably want to avoid the tar -cJf syntax.Īccording to man xz, the way to do this is:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |