I'm trying to use the tar command in a BASH shell and want to exclude files. If I use this command: tar --exclude=._* -cvfj oldemail.tbz bzip2
tar creates an archive named j
I have tried other variations of the --exclude= command with errors made in naming or creation of the tar file.
TIA. The problem is not in the exclude option; -f is used to specify the filename of the archive you are creating, it reads whatever is immediately following. In this case it is "j". So the mistake is not
On 18/06/10 03:51, Keith wrote: putting -f as the last option. Also, leaving a '*' unquoted like that doesn't seem right, if there are files that match the glob in the current directory it will fail. And what are the files you are trying to compress? Are they really called "bzip2"? try instead tar --exclude='._*' -cvjf oldemail.tbz email where "email" is the dir you are trying to compress Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org