Keep your tar file in compress state

If you want to keep your files in tar and compress your tar file as well, for reducing disk space and bandwidth to transfer file.

If you want to keep your files in tar and compress your tar file as well, for reducing disk space and bandwidth to transfer file.
Linux Command is best for this the directory is linux
[[email protected] ~]$ tar cf – linux | gzip/bzip > tarcompress.tar.gz
Used gzip like below-
[[email protected] ~]$ tar cf – linux | gzip > tarcompress.tar.gz
Tar
To verify your tar+gzip file data inside-
[[email protected] ~]$ tar -tzvf tarcompress.tar.gz
To search specific file data from tar+gzip file-
[[email protected] ~]$ tar -ztvf tarcompress.tar.gz ‘linux/c’
tar-search
For uncompressing your tar+gzip file-
[[email protected] ~]$ tar -tzvf tarcompress.tar.gz
Untar
If you wanted to capture the output so you had an index file of what the tar file contains:
For sh, ksh shell prompt use:
[[email protected] ~]$ tar cvf – linux 2>foo.idx | gzip/bzip2 > tarcompress.tar.gz
For csh shell prompt use:
[[email protected] ~]$ (tar cvf – linux | gzip/bzip2 > /tarcompress.tar.gz)>&tarcompress.idx

1 comments
0 likes
Prev post: Find directories by his Inode numbersNext post: Find your string & files

Related posts

Comments

  • 2014Marietta

    December 13, 2017 at 7:10 pm
    Reply

    I see your website doesn't rank in google's top 10, but your articles can get into top 10. You should find the right longtail keywords before you […] Read MoreI see your website doesn't rank in google's top 10, but your articles can get into top 10. You should find the right longtail keywords before you write a post. How to find super easy longtail keywords? Search in google for; Fasrixo's tools Read Less

Leave a Reply

Your email address will not be published. Required fields are marked *

Aidbs Gallery
Latest Posts
Categories
Archives