* tar not working as advertised?
@ 2000-04-05 2:21 Edward D. Silver
0 siblings, 0 replies; only message in thread
From: Edward D. Silver @ 2000-04-05 2:21 UTC (permalink / raw)
To: tru64-unix-managers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-05 2:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-05 2:21 tar not working as advertised? Edward D. Silver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox