University Crest

[wlug] Re: Linux guru test

wlug archive index About the wlug list Mailing lists home
To The University of Waikato HomepageWaikato Home > Waikato Mailing Lists > wlug Info > wlug archives
Oliver Jones oliver@d...
Sat Apr 9 00:33:08 NZST 2005

On Fri, 2005-04-08 at 23:16 +1200, Jason Drake wrote:
> > We once spent an entertaining amount of time discussing the safest way 
> > to remove a file owned by root, in the / directory, named " -rf"
> >
> > I'd love to see what the list suggests for this :)
> >
> how about
> unlink -rf
> or simply
> rm /-rf
> either should work but the first would be safer from a typos perspective

cd / && rm ./-rf

Incidentally I just deleted all the logs of a website by accident with
rm -f....  *sigh*.  Not that it mattered much.  A lot of the log data
was foo anyway.

                   Oliver Jones » Roving Code Warrior
   oliver@d... » +64 (21) 41 2238 » 

More information about the wlug mailing list
NOTICE: This is an archive of a public mailing list. The University of Waikato is not responsible for its contents.

The University of Waikato - Te Whare Wananga o Waikato