[Bendug] file name oddities
Gary E. Miller
gem at rellim.com
Sun Feb 19 16:33:31 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yo Tim!
On Sat, 18 Feb 2006, Tim Howe wrote:
> I'm thinking of updating my file name normalizing script (I use it for f
> iles in web directories) to get rid of crap like this. Did I miss some
> obvious solution? For some reason I think I did.
Hackers love to use file names like that, and worse. Yoy have several choices
depending on the command you wish to run.
Most program that take command line arguments starting with - allow
you to specify the end of "-args" and the start of file names with the "--"
arg. This is POSIX standard so should also apply to most BSD flavors.
So you could do this:
mv -- -stupidfilename goodfilename
RGDS
GARY
- ---------------------------------------------------------------------------
Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
gem at rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFD+Q5e8KZibdeR3qURAmaMAJsEjA9GJo8CVlUz9w6nxMs5dr6ZDQCguOOM
wGKvZgQM7BOgOmuXRkaGLE4=
=bpj0
-----END PGP SIGNATURE-----
More information about the Bendug
mailing list