How to us the 'rm' command in Linux

Tags

More like this

Better: someone was using a script with:

rm -rf /$DIR

but, if $DIR isn't defined, this is the root directory.

Define DIR with a full or relative path and using

rm -rf $DIR

is much safer, since "rm -rf" fails.

I thought the actual command was sudo rm -rf /

It's a well-known fix for most computer issues.

By Marion Delgado (not verified) on 24 May 2012 #permalink

Spaces are important.

Back in the days before package management was all that great in linux, I was trying to install xscreensaver. I had a whole bunch of different copies of xscreensaver-X.y.z.tar.gz and other assorted archives. Once I finished, I cleaned them up quickly by typing:

rm xscreensaver *

I meant to type rm xscreensaver* to erase everything starting with "xscreensaver". Instead it tried to erase "xscreensaver" (no file by that name), and then it erased everything. It was not recursive and didn't erase files starting with ., but it was still an immediate OOPS.

Linux - an exercise in obfuscation via complication

If you have to do something perfect the first time, maybe you should rethink doing it the first time. Now let's talk about Linux. Wait I repeat myself.

You expect me to believe that the people who wrote Sunwindows *and* Renderman couldn't undelete files on a UNIX disc?

By Ian Kemmish (not verified) on 28 May 2012 #permalink

I hear very little in the pbluic domain which persuades me one way or the other.If you mean in the MSM then yes, unfortunately scientific argumentation almost always runs second to more simple, but less credible lines of argumentation.But there are plenty of first class climate blogs out there that for many years (and I'm not just thinking about RealClimate) having been examining the scientific arguments one way or the other. And of course the IPCC reports themeselves are all pbluic domain'.So while I'm happy to agree that the MSM coverage of the issue has been less than adequate in general (with of course some exceptions) I disagree that there has not been good arguments presented in the pbluic domain more broadly.Do we mitigate or do we adapt?Almost all of the informed commentary I hear recognises that for the false dichotomy it is. The climate has already changed and further changes are locked in' so we have to adapt to some degree. On the other hand the climate changes projected under a BAU emissions trajectory are such that nearly everyone accepts that we need to mitigate to a signficant degree as well.