Difference between revisions of "Tar"

From wikieduonline
Jump to navigation Jump to search
Line 22: Line 22:
 
:<code>--lzop</code> Filter the archive through [[lzop]]
 
:<code>--lzop</code> Filter the archive through [[lzop]]
 
:<code>--no-auto-compress Do not use archive suffix to determine the compression program</code>
 
:<code>--no-auto-compress Do not use archive suffix to determine the compression program</code>
:<code>-z, --[[gzip]], --gunzip, --ungzip</code> Filter the archive through gzip
+
:<code>-z, [[--gzip]], --gunzip, --ungzip</code> Filter the archive through gzip
 
:<code>-Z, --compress, --uncompress</code> Filter the archive through compress
 
:<code>-Z, --compress, --uncompress</code> Filter the archive through compress
 
:<code>--[[zstd]] Filter the archive through zstd</code>
 
:<code>--[[zstd]] Filter the archive through zstd</code>

Revision as of 04:24, 3 May 2023

https://en.wikipedia.org/wiki/Tar_(computing)

Options

http://man7.org/linux/man-pages/man1/tar.1.html

-c (--create)
-remove-files
-t or --list list content of tar file
-v (--verbose)

Examples

  • tar -cf new_file.tar /path/folder/to/tar
  • tar -cvf new_file.tar /path/folder/to/tar
  • -c (--create)

With compression

  • tar -Jcvf new_file.tar.xz /path/folder/to/tar or tar Jcvf new_file.tar.xz /path/folder/to/tar[1]
-J, --xz
-j, --bzip2
--lzip Filter the archive through lzip
--lzma Filter the archive through lzma
--lzop Filter the archive through lzop
--no-auto-compress Do not use archive suffix to determine the compression program
-z, --gzip, --gunzip, --ungzip Filter the archive through gzip
-Z, --compress, --uncompress Filter the archive through compress
--zstd Filter the archive through zstd


Compress directory using xz multithread capabilities

tar c your_directory | xz -T0 -c > your_file_name.tar.xz



tar (child): Cannot connect to 2019-08-02T06: resolve failed
tar: 2019-08-02T06\:00+04\:00.tar.xz: Cannot write: Broken pipe
tar: Child returned status 128
tar: Error is not recoverable: exiting now

Related terms

See also

  • https://stackoverflow.com/a/18855909
  • Advertising: