From: "Edward D. Silver" <eds () ipcc ! com>
To: tru64-unix-managers
Subject: tar not working as advertised?
Date: Wed, 05 Apr 2000 02:21:11 +0000 [thread overview]
Message-ID: <96079343919339.tru64-unix-managers.marc@archive.invalid> (raw)
I'm having a problem getting the tar command to work as advertised. I'm
migrating a drive's contents to a bigger drive and I'm tar'ring to STDOUT
then changing to the new directory to untar as in:
cd fromdir; tar cf - . | (cd todir; tar xpf -)
There is one directory that I do NOT want to copy to the new drive and,
according to the man page, you can use the exclude flag as in (taken
straight from the man page):
<snip>
tar cvf /tmp/mybackup.tar -e $HOME/zeugma $HOME
The preceding command line uses the f flag to create a tar archive named
mybackup.tar in the /tmp directory. The archive contains the user's
home directory and its contents, including all subdirectories and files
except the zeugma subdirectory and its contents, which are excluded by the -e
(exception) flag.
<snip>
This doesn't work!
My command looks exactly like this one except I'm using STDOUT as the
filename (-) and tar refuses to exclude the directory. I've tried quotes,
absolute paths to the directory, and wildcards--and none of them seem to
work. It always adds them to the archive anyway. How do I get it to
exclude this directory?! Here's my command (run from the 'contents' dir):
tar cvpf - . -e messages | ( cd /new_disk/contents ; tar xpf - )
-Ed Silver
reply other threads:[~2000-04-05 2:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox