Re:Why "ls *.c" is at least dumb, and possibly dangerous
by duskwuff on Thursday October 08, 2009 @11:00PM
(#870509)
I've seen some concepts thrown around about a (Linux) kernel patch to disallow filenames which contain unprintable characters. I approve of them.
With regard to why this matters, it's not uncommon for badly written scripts to interpolate filenames directly into commands. Consider this Perl fragment:
With regard to why this matters, it's not uncommon for badly written scripts to interpolate filenames directly into commands. Consider this Perl fragment:
and what it would do with a file called: