So I need to compress a directory with max compression.
How can I do it with
xz? I mean I will need
tar too because I can't compress a directory with only
xz. Is there a oneliner to produce e.g.
With a recent GNU
tar's lowercase j switch uses bzip, uppercase J switch uses xz.
This is now maximal.
is even better than
You might try different options, for me -4e works better
I tested by running:
So, it seems that option -4e works a little bit better than -9e.
This is not an exact answer to your question but you could use one command instead of two:
adds all files from directory "dir1" to archive archive.7z using "ultras ettings"
other formats supported are: zip, gzip, bzip2 or tar. for this just replace
NOTE: don't use this command to backup your system files except personal files because the 7z format doesn't store filesystem permissions.