[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-list
Subject:    Re: undo rm -rf *
From:       Reindl Harald <h.reindl () thelounge ! net>
Date:       2013-03-30 9:32:03
Message-ID: 5156B113.6040900 () thelounge ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Am 30.03.2013 04:18, schrieb Bill Davidsen:
> Reindl Harald wrote:
> > 
> > 
> > Am 26.03.2013 21:08, schrieb Rick Stevens:
> > > 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 ("..")
> > 
> > and you don't as proven above
> > 
> I hate to say it, but I don't want to ever have to trust that the rm I'm getting is \
> the one I expect and not some alias, function, thing earlier on a PATH,

i hate to say it, but i know how to do my job and control aliases and PATH
_______________________________________

[harry@srv-rhsoft:~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/harry/bin:/scripts
 unset USERNAME
_______________________________________

[harry@srv-rhsoft:~]$ cat .bashrc
# .bashrc
PS1="\[\033[1;32m\][\u@\h:\w]$\[\033[0m\] "
# Source global definitions
if [ -f /etc/bashrc ]; then
 . /etc/bashrc
fi
if [ -f /usr/local/etc/bash_profile ]; then
 . /usr/local/etc/bash_profile
fi
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/harry/bin:/scripts
 _______________________________________

[harry@srv-rhsoft:~]$ cat /usr/local/etc/bash_profile | grep rm
alias rm='/usr/bin/rm -I --one-file-system'


["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

-- 
users mailing list
users@lists.fedoraproject.org
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic