Operating System - HP-UX
1832645 Members
2771 Online
110043 Solutions
New Discussion

what is the option to exclude files/dirs using tar in HP-UX 11i v2

 
SOLVED
Go to solution
GSK_2
Advisor

what is the option to exclude files/dirs using tar in HP-UX 11i v2

Hi Guys,
Could anyone of you please help me with the below query.
what is the option/syntax to exclude files/dirs using tar in HP-UX 11i v2

Thanks in advance.
Satish
4 REPLIES 4
Rajeev  Shukla
Honored Contributor

Re: what is the option to exclude files/dirs using tar in HP-UX 11i v2

There is no option in tar to exclude files or directories once you specify the path to tar.
Say you tar /etc then everything in /etc is tared.
Other option you could look at is fbackup where you can specify the include and exclude options to archive the files

Cheers
Rajeev
Timothy P. Jackson
Valued Contributor
Solution

Re: what is the option to exclude files/dirs using tar in HP-UX 11i v2

Hi Satish,

I have run into the same problem and the only way I found with out creating a script or using CPIO is to use fbackup.

fbackup is really easy to use and you can setup multiple graphs that can be used for different backup or file transfers. fbackup is also designed to be faster than TAR or CPIO.

Tim
Mancboy
Valued Contributor

Re: what is the option to exclude files/dirs using tar in HP-UX 11i v2

Hi Satish,
gnu tar has the exclude option and I would recommend using it if you ever want to port archives between OSes.
see hpux.connect.org.uk/hppd/hpux/gnu/tar-1.15.1

But fbackup is a lot easier for excluding as you have one "graph" file that can be easily edited.
GSK_2
Advisor

Re: what is the option to exclude files/dirs using tar in HP-UX 11i v2

Thanks to all. All your resposes have been helpful.

Regards
Satish