User Tools

Site Tools


tar_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tar_usage [2020/12/04 15:51] rajutar_usage [2023/01/26 21:24] (current) – [sample commands] raju
Line 1: Line 1:
 +==== count number of lines in a txz file ====
 +<code>
 +xz -cd foo.txz | wc -l
 +</code>
 +
 +<code>
 +for i in *.txz; do echo $i; xz -cd $i | wc; done
 +</code>
 +
 +==== file extensions ====
 +  * tar gzip compressed - .tgz
 +  * tar bzip2 compressed - .tar.bz2, .tar.bz, .tbz
 +  * tar xz compressed - .txz
 +
 +==== sample commands ====
 +<code>
 +tar cJvf foo.txz foo
 +</code>
 +
 +==== convert tgz to txz ====
 +<code>
 +cat foo.tgz | gzip -cd | xz > foo.txz
 +</code>
 +
 +To do the other way around
 +<code>
 +cat foo.txz | xz -cd | gzip > foo.tgz
 +</code>
 +
 +Ref:- http://lowfatdaemon.blogspot.com/2012/01/how-to-repackage-txz-to-tgz-slackware.html
 +
 +tags | change compression algorithm of a tar archive
 +
 ==== internal links ==== ==== internal links ====
   * [[Relative file names in a tar archive]]   * [[Relative file names in a tar archive]]
 +
  
  
tar_usage.1607097061.txt.gz · Last modified: 2020/12/04 15:51 by raju