Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-03-2003, 03:01 PM   #1
LQ Newbie
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
Question rm command usage

I need information on usage of the 'rm' command.

First question: If you issue the command 'rm -rf /' while logged in as root, what are the results? (I know it is a bad thing)

Second question: If you issue the same command, but logged on as a normal user instead of root, what are the results?

The questions are being posed to me and, while I know they are "bad", I would like to be able to answer the questions more specifically.

Thanks in advance for your help!

Old 11-03-2003, 03:04 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Welcome to LQ.

rm -rf /
run as root will erase everything on your system
run as a user will only remove files where the user has write access

For info on using rm:
man rm
Old 11-03-2003, 03:08 PM   #3
LQ Newbie
Registered: Nov 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks David!
Old 11-04-2003, 04:17 AM   #4
Registered: Mar 2003
Location: Essex UK
Distribution: rh 8.0 bsd 5.0 slack 9.0 rc2 crux
Posts: 147

Rep: Reputation: 15
but of course all the fun starts when it tries to delete rm itself


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo command usage??? pagadala_cs Linux - Software 1 12-24-2004 10:13 AM
Usage of 'expr' command subu_s Programming 2 12-03-2004 01:23 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
another odd command usage citrus Linux - Software 13 05-11-2004 03:26 PM
usage of rpm command woja Linux - Newbie 4 01-30-2004 04:32 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration