tar command
i have abt 3 gb of data which i have to compress in 1.5 gb of space but all i know is the gzip command...plz tell me how to create a tar archive n compress it ...n also how to uncompress it...also suggest other commnds by wich i can acompress 3gb to abt 1.5gb
thanks |
tar -czf archive.tar.gz /path/to/data
z makes tar use gzip you can use a j instead to use bzip2. |
what is /path/to/data n is archive in archive.tar.gz stand for the name of thae archive..n say i have 10 files n i want to add all of those in gzip format in one tar archive.how is it possible.
eg...i have files.. /mnt/windows/one /mnwindows/imp/two /mnt/windows/examp/three /home/check i want to have all the files in a file called important.tar.gz(if i have .gz ...it implies files in gzip format) what should be the command now thanks |
Code:
tar -czf important.tar.gz /mnt/windows/one /mnwindows/imp/two /mnt/windows/examp/three /home/check |
where will this tar archive be created .....in my home dir
thanks |
IT will be created in the directory you are in. If you want it in your home directory then use:
Code:
tar -czf ~/important.tar.gz /mnt/windows/one /mnwindows/imp/two /mnt/windows/examp/three /home/check |
n say if i have a dir with many subdirs n i want to create a tar archive of the entire dir inludeing all the subdirs...
is it possible thnx |
That command should do it.
|
All times are GMT -5. The time now is 10:32 AM. |