Hi,
I want to tar files and zip them in order to clean up space in directory. I have files like /path/file1 /path file2.
What I am trying to do is:
Option 1:
tar -cvf /path/file1 /path file2 | gzip > test.tar.gz
I got the file created. But while trying to extract the Tar and zipped file, I am getting this error:
gunzip -c test.tar.gz | tar -xvf -
tar: 0511-164 There is a media read or write block size error.
Option 2:
tar -cvf mytest.tar.gz /path/file1 /path file2
It creaated file but on extracting i got this error:
gunzip mytest.tar.gz
gunzip: mytest.tar.gz: not in gzip format
My system does not recognize "z" flag in tar command. So i have to go with above options only. What am i missing above?Could you please suggest a way to extract Tar zipped files?
Thanks.