On 03/26/2013 10:35 AM, Reindl Harald issued this missive:
Am 26.03.2013 18:03, schrieb Matthew Saltzman:
this is safe since a very long time
[root@testserver:/tmp]$ LANG=c; /usr/bin/rm -rf .*
/usr/bin/rm: cannot remove directory: '.'
/usr/bin/rm: cannot remove directory: '..'
Does this not depend on where in the tree you are and what permissions
you have on . and ..?
how many more permissions will you have than root?
"rm" and "rmdir" take care to not delete "." or "..". "rm" also requires
the "-f" along with "-r" to delete non-empty directories. You don't
want to delete your current directory (".") and you sure don't want to
delete its parent (".."). Doing either orphans the shell you're in (it
has no current directory). Yes, you can delete them from another shell
and orphan the current one, but that's bad practice.
Unless you're ABSOLUTELY certain you are deleting what you want, you
should check the results of an "ls" and possibly use the "-i", "-I" or
"--interactive" flags.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Give me ambiguity or give me something else! -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org