Mobile version of this page
Previous:
"Confessions of a College Callgirl" is the new "My Secret Life As A Prostitute"
Next:
See you at PyCon 2008
Catching a carriage return in bash
Case insensitive list remove call (part II)
Case insensitive list remove call
pwdf - a mix of ls and pwd
type - Writing shell scripts
ztar - my wrapper on tar -z
Read in passwords with bash
Furious and deprived by 'rm *'
"Confessions of a College Callgirl" is the new "My Secret Life As A Prostitute"
Next:
See you at PyCon 2008
Related blogs
Mvbackupfiles - a script to "delete" back autosaved backup filesCatching a carriage return in bash
Case insensitive list remove call (part II)
Case insensitive list remove call
pwdf - a mix of ls and pwd
type - Writing shell scripts
ztar - my wrapper on tar -z
Read in passwords with bash
Furious and deprived by 'rm *'
Related by category
File check before delete
6th of March 2008
Because I always forget, here's how to check if a file exists before attempting to delete it in bash:
[ -f foobar.html ] && rm foobar.html
If you don't do it this way and the file doesn't exist you get this:
rm: cannot remove `foobar.html': No such file or directory







Save this page in del.icio.us
rm -f foobar.html will not complain if the file doesn't exist