Excluding directories and files while taring in Solaris

August 10th, 2009 by Girish | Posted under Linux.

Excluding directories and files while taring in Solaris

I need to tar every thing in /home/ excluding /home/logs , this is how I does on solaris

1. Create a file called exlude.this with the following entries
/home/logs

2. Save the file in /

3. tar cvfX <tarfilename.tar> <exclude.this with full path> <Path of the directoy which need to be tarred>

Example

tar cvfX file.tar /exclude.this /home/
This will tar all files and folders in /home directory excluding the files mentioned in exlude.this (/home/logs) and create a tar file named file.tar

Need more info ?
Blog Widget by LinkWithin
 







Tags: , ,

Have any comments?

Incoming search terms for the article: