Skip to main content
added compression switch; rm verbose switch for simplicity
Source Link

Assuming xz honors the standard set of commandline flags - including compression level flags, you could try:

tar -cvfcf - foo/ | xz -9 -c - > foo.tar.xz 

Assuming xz honors the standard set of commandline flags, you could try

tar -cvf - foo/ | xz -c - > foo.tar.xz 

Assuming xz honors the standard set of commandline flags - including compression level flags, you could try:

tar -cf - foo/ | xz -9 -c - > foo.tar.xz 
Source Link

Assuming xz honors the standard set of commandline flags, you could try

tar -cvf - foo/ | xz -c - > foo.tar.xz