News for hackers. Stuff that matters.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by rmaccloy on Thursday October 08, 2009 @09:45PM (#870421)
Filenames can contain plenty of happy stuff.

$> touch -- --

$> rm --

usage: rm [-f | -i] [-dPRrvW] file ... unlink file

$> rm -- --

$> touch \

$> touch \\ \ \ . \-

favorites of malware authors everywhere.

Re:Why "ls *.c" is at least dumb, and possibly dangerous by aw3c2 on Friday October 09, 2009 @03:31AM (#870808)
On a sidenote, creating a -i file in important directories can help against accidental "rm -rf"s. The -i will be given to rm as switch and rm will now prompt for each file. Of course backups are better but this might just safe your ass that certain time.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by mncaudill on Thursday October 08, 2009 @11:57PM (#870591)
I instinctively cringe whenever I see an odd looking 'rm' command.