#### Archived

This topic is now archived and is closed to further replies.

# Suspicious command. [beginner level]

This topic is 5448 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi every-1. I''ve been told by a stupid guy that I should use the rm * -R command to remove all the files I don''t need under Linux in order to be able again to boot the PC (we''ve got a kind of administrating system that only allows us 30Mo so that Linux''s windows managers refuse to start if the space disk is full). I know I mustn''t use this command if I dont wanna have problems but what the hell is it used for??? Thanks for your help. Prog, Hex & Rock''n''Roll : I don''t like the Prog but the Prog likes me. Some nice poetry to sweeten your spirit and relax a bit before programming

##### Share on other sites
It deletes all files in the current directory, and all sub-directories.

##### Share on other sites
Most linux commands have a man page that you can look at to see what they do. In this case:

man rm
quote:

NAME
rm - remove files or directories
...

OPTIONS
-r, -R, --recursive
remove the contents of directories recursively
...

-------
Andrew
PlaneShift - A MMORPG in development.

##### Share on other sites
Just don''t do it when you''re logged in as root , sat in /

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

##### Share on other sites
We used to have this problem at school too. Do you have a web browser that you can run from this account? You should delete the cache for this program if you do and then use the preferences to set the cache size to something like 5 M. You probably don't want to rm -R in any old place .

I'd find the music files, mpgs, binary files, etc that you don't need and get rid of those using "rm blahblah.mpg", etc.

You probably have a quota program on that system so you can type "quota" to see how much space you are currently using.

[edited by - RandomTask on October 14, 2003 6:49:20 PM]

##### Share on other sites
quote:
Original post by superpig
Just don''t do it when you''re logged in as root , sat in /

Just be careful with that command regardless. I, unfortunately, have personal experience that a little typo like "rm -R ~ /someDir" can be disasterous. In the hands of root it just gets worse.

##### Share on other sites
Once I was in / and I wanted to edit an important system file. I don''t know what I was thinking, but instead of typing vi filename, I typed rm filename. Luckily, I found a little tool which generated that system file.

##### Share on other sites
Yeah, rm can be evil if you make a typo.
A friend was in his source dir, and he wanted to delete all his .o files, so he typed:
rm -f * .o (notice the space between * and .o)
Needless to say, he deleted all his source...

Height Map Editor | Eternal Lands | Fast User Directory

##### Share on other sites
quote:
Original post by KurtCPP
Thank you all for your advice. The f***er who told me that nonsense will be thoroughly broken into pieces.

Don''t be mad at him, rm -Rf / is an old ''joke'' that is often tossed around, just like Goatse, and Man.

1. 1
2. 2
3. 3
Rutin
22
4. 4
frob
18
5. 5

• 33
• 13
• 11
• 10
• 12
• ### Forum Statistics

• Total Topics
632570
• Total Posts
3007123

×