[Techtalk] Really dumb filename question...

Diggy Bell diggy at dbsoftdev.com
Tue Aug 26 07:36:56 EST 2003

Hey folks...

I'm sitting here feeling 'not-so-bright' and wondering how I'm going to fix
a small problem.

I was trying to package up some files this morning and typed something
similar to this:

tar czf --exclude=`*.php' --exclude='*.html' sourcedir

If you're more awake than I was, you'll realized that I probably forgot to
put a file name in there.  You probably also realized that I now have an
archive named '--exclude=*.exe'.  Ooops!

Ok, so that was a simple enough mistake that should be easily corrected,
right?  I can't seem to figure out the magic escape sequence to get any
thing to treat it as a filename instead of a commandline parameter.

My first thought was wildcards, but it doesn't like that at all.

rm *.pdf <failed>
rm \-* <failed>

The same goes for any other combination I could think of.  I even tried
rm -rf sourcedir!

Has anybody got any suggestions here?


William D. 'Diggy' Bell
DB Software Development

More information about the Techtalk mailing list