Live Chat Software by Kayako
سولات متداول
نحوه اکسترکت کردن فایل های فشرده از طریق SSH
منتشر شده توسط 4th d1 روشن 1393/12/16 - 11:30 AM
TAR [*.tar file] - فایل آرشیو بدون فشرده سازی

TAR GZIP [*.tar.gz file] - فایل آرشیو Tar با فشرده سازی از طریق الگوریتم GZip
TAR BZIP2 [*.tar.bz2 file] - فایل آرشیو Tar با فشرده سازی از طریق الگوریتم BZip2

Extract and Uncompress [tar], [tar.gz] and [tar.bz2] Files

[tar] - Extract (unpack) a TAR File

$ tar -xvf foo.tar

[tar.gz] - Extract and Uncompress a TAR File Compressed with GZIP

$ tar -xvzf foo.tar.gz

[tar.bz2] - Extract and Uncompress a TAR File Compressed with BZIP2

$ tar -xvjf foo.tar.bz2

OptionDescription
-x extract files from an archive
-v verbosely list files processed
-f specify an archive or a tarball filename
-z decompress the contents of the compressed archive created by gzip program [tar.gz]
-j decompress the contents of the compressed archive created by bzip2 program [tar.bz2]

List the Contents of [tar], [tar.gz] or [tar.bz2] Files

[tar] - List the Contents of a TAR File

$ tar -tvf foo.tar

[tar.gz] - List the Contents of a TAR File Compressed with GZIP

$ tar -ztvf foo.tar.gz

[tar.bz2] - List the Contents of a TAR File Compressed with BZIP2

$ tar -jtvf tar.bz2

OptionDescription
-t list the contents of an archive

Extract a Single File from a TAR Archive

Use the following commands to extract a single file, called bar.txt, from an archive :
$ tar -xvf foo.tar bar.txt
$ tar -xzvf foo.tar.gz bar.txt
$ tar -xjvf foo.tar.bz2 bar.txt

You can also specify a path to the file :
$ tar -xvf foo.tar docs/bar.txt
$ tar -xzvf foo.tar.gz docs/bar.txt
$ tar -xjvf foo.tar.bz2 docs/bar.txt

Extract a Single Directory from a TAR Archive

Use the following commands to extract a single folder, called docs, from an archive :

$ tar -xvf foo.tar docs
$ tar -xzvf foo.tar.gz docs
$ tar -xjvf foo.tar.bz2 docs

You can also extract some sub-directory :
$ tar -xvf foo.tar docs/images
$ tar -xzvf foo.tar.gz docs/images
$ tar -xjvf foo.tar.bz2 docs/images

(1 رای (ها))
مفید
مفید نیست

نظرات (0)
ارسال نظر جدید
 
 
نام کامل:
ایمیل:
نظرات: