tar and gzip files

Hi Guys,

I am using RHEL5 and Solaris 9 & 10.

I want to tar and gzip my files then remove them after a successful tar command...

Lets say I have files with extension .arc then I want to tar and gzip these files.

After successful tar command I want to remove all these files (i.e .arc).

Please Help!!!!!!!!

You didn't provide much info about where the files exists.
Simply, If files are in the same directory,

tar -cvf *.arc arc_files.tar
gzip arc_files.tar

Thanks, but how do I make sure that the files that I remove are in the tar file?

You could do an integrity check using gzip then if it's good remove the rest of the files:

gzip -vt <file.tar.gz>

files.tar.gz:	 OK