thanks to everyone who replied. the answer that was offered by our old friend criggie off list (new work policy) was

Look at   --exclude-from FILENAME
and have a list of all the paths you want to skip in FILENAME

which is easy and works exactly as I am wanting.

to answer ross's post below, yes, it is important to have --exclude before the 
folders to back up but am already doing so.  thanks though for your 
investigations too.

it has been cool to get some backups - and restores - working so easily and 
without any proprietary software!  once i finish this fine tuning and have put 
in a cron job i think i'll move on to having a play with rsync.  it has also 
been suggested that i have a look at backuppc
http://backuppc.sourceforge.net/ and while it looks pretty cool will have to 
wait for another day . . .

Cheers,
Roger




Ross Drummond wrote:
On Thu, 31 May 2007 13:37, Christopher Sawtell wrote:
Quoting Roger Searle <[EMAIL PROTECTED]>:
How can I get tar to honour --exclude with hidden folders? Can anyone
point me in the right direction? aside from man tar or info tar or
google which I have already tried.
You have either just discovered a bug in tar or its manual page.
I couldn't get it to work properly with the --exclude PATTERN option
either.

I'd suggest using cpio instead.

find /dir/one /dir/two | grep -v '/\.' | cpio --create

Do please check the manual page for the exact cpio options, there are
hordes of them.

This thread discusses the problem;

http://ubuntuforums.org/showthread.php?t=70566

Seems that you have to specify the excludes in your options before tar parses the arguments.

Cheers Ross Drummond

Reply via email to