How To Compress A Tar Ball Directory In Linux
RegisterLogin
How To Compress A Tar Ball Directory In Linux
Post Description: How To Compress A Tar Ball Directory In Linux
Tags: How, To, Compress, A, Tar, Ball, Directory, In, Linux
This Post Was Posted On Feb 29, 2008 By web hosting #784
Post Description: How To Compress A Tar Ball Directory In Linux
Tags: How, To, Compress, A, Tar, Ball, Directory, In, Linux
This Post Was Posted On Feb 29, 2008 By web hosting #784
How To Compress A Tar Ball Directory In Linux by web hosting
hostman
#982 1
Usage
* To pack tar files, use the following commands:
- for an uncompressed tar file:
Code:
- to pack and compress (one step at a time):
Code:
- to pack and compress all at once:
Code:
- to create a tar from a directory and its subdirectories:
Code:
* To unpack tar files, use the following commands:
- for an uncompressed tar file:
Code:
- to decompress and unpack one step at a time:
Code:
- to decompress and unpack all at once:
Code:
* To list the contents of a tar file, use the following command:
Code:
To use bzip2 instead of gzip, simply replace the commands above with bzip2 where gzip is used and bunzip2 where gunzip is used.
* To pack tar files, use the following commands:
- for an uncompressed tar file:
Code:
tar -cf packed_files.tar file_to_pack1 file_to_pack2
- to pack and compress (one step at a time):
Code:
tar -cf packed_files.tar file_to_pack1 file_to_pack2 ...
gzip packed_files.tar
gzip packed_files.tar
- to pack and compress all at once:
Code:
tar -cf - file_to_pack1 file_to_pack2 ... | gzip -c > packed_files.tar.gz
- to create a tar from a directory and its subdirectories:
Code:
tar -cvf packed_files.tar dir_to_pack
* To unpack tar files, use the following commands:
- for an uncompressed tar file:
Code:
tar -xf file_to_unpack.tar
- to decompress and unpack one step at a time:
Code:
gunzip packed_files.tar.gz
tar -xf packed_files.tar
tar -xf packed_files.tar
- to decompress and unpack all at once:
Code:
gunzip -c packed_files.tar.gz | tar -xf -
* To list the contents of a tar file, use the following command:
Code:
tar -tvf file_to_list.tar
To use bzip2 instead of gzip, simply replace the commands above with bzip2 where gzip is used and bunzip2 where gunzip is used.
Jul 24, 2006 Reply Report abuse
hostman
#981 2
I you want to pack a whole directory along with its files and subdirectories, try running this command at the shell to see if it works, not sure if this is the correct command though:
Code:
Code:
tar -cvf - directory_name | gzip -c > packed_directory_name.tar.gz
Jul 24, 2006 Reply Report abuse
©2012 Webune Forums - Tue Dec 18, 2012 12:53 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3