User Tools

Site Tools


tar

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 [2022/07/19 20:52] – created 85.134.209.200tar [2022/07/21 00:01] (current) – Updated formatting admin
Line 3: Line 3:
 =====TAR - Archive Utility===== =====TAR - Archive Utility=====
 Tar up specific files or folders: Tar up specific files or folders:
 +<code>
  tar -cvf <destination.tar> files  tar -cvf <destination.tar> files
 +</code>
  
 Tar up all files and folders (full stop implies all): Tar up all files and folders (full stop implies all):
 +<code>
  tar -cvf <destination.tar> .  tar -cvf <destination.tar> .
 +</code>
  
 Once tar'ed up - gzip them: Once tar'ed up - gzip them:
 +<code>
  gzip <destination.tar>  gzip <destination.tar>
 +</code>
  
 UnTar Files and Folders (be very careful - you dont know where files will untar to!!): UnTar Files and Folders (be very careful - you dont know where files will untar to!!):
 +<code>
  tar -xvf file.tar  tar -xvf file.tar
 +</code>
  
 List files in a TAR (only works with uncompressed tar's) List files in a TAR (only works with uncompressed tar's)
 +<code>
  tar -tf file.tar  tar -tf file.tar
 +</code>
  
 Uncompress a SINGLE file Uncompress a SINGLE file
 +<code>
  tar -x exact/file/as/listed_in_tar_file -f file.tar  <nowiki>//</nowiki>should replicate to path as was archived.  tar -x exact/file/as/listed_in_tar_file -f file.tar  <nowiki>//</nowiki>should replicate to path as was archived.
  tar -x exact/file/as/listed_in_tar_file -f file.tar -O > file_out.txt  tar -x exact/file/as/listed_in_tar_file -f file.tar -O > file_out.txt
- +</code>
 ---- ----
 Further Information at: http://www.sgr.nada.kth.se/delfi/docs/konto/unix-utrymme.html.en Further Information at: http://www.sgr.nada.kth.se/delfi/docs/konto/unix-utrymme.html.en
tar.1658260370.txt.gz · Last modified: 2022/07/19 21:13 (external edit)