Originally Posted by lleb
found this set of arguements and they do exactly what I want, but they create a larger file called 'W' why?
tar cvfW test.tar.bz2 /www/http/docs/rx30/*.sh
oh and when i cat W, it has all of the code from the *.sh scripts in it, what gives with that?
If that is exactly the command line you ran, then what you describe shouldn't have happened. But, if the actual command line was
tar -cvfW test.tar.bz2 /www/http/docs/rx30/*.sh
(note the "-" introducing the option letters), then that would indeed create an archive file named "W" and include within that archive the file "test.tar.bz2" and files matching "/www/http/docs/rx30/*.sh" (and incidentally, not
do the checking you thought was happening).
For historical reasons, tar
supports two different styles for the single-letter options. The "old" style (no "-") and the more modern (with a leading "-") style look very similar, but options that take arguments are parsed very differently in the two styles. I suggest you read the info page for tar
and pay particular attention to the section titled, "The Three Option Styles".