From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079343919339.tru64-unix-managers.marc@archive.invalid> From: "Edward D. Silver" Date: Wed, 05 Apr 2000 02:21:11 +0000 To: tru64-unix-managers Subject: tar not working as advertised? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079343919339 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): 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. 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