Find the answer to your Linux question:
Results 1 to 8 of 8
Hi Guys, First post and new to Linux so hope someone can help me. I have been asked what is the issue with running "rm -Rf / mytmpdir;" ? and ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4

    Question about mkdir

    Hi Guys,

    First post and new to Linux so hope someone can help me. I have been asked what is the issue with running "rm -Rf / mytmpdir;" ?

    and I can't figure it out? Is it a trick question?
    Last edited by LinuxNewbie12; 06-15-2011 at 02:12 PM. Reason: code

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Kind of, as the first command lures you on a false way.
    I will not solve it for you, as it sounds like a homework question and it is also not that hard to figure out

    Just two hints:
    1) Do not execute that, especially not as root.
    2) Read the man page
    Code:
    man rm
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    awwwwwwwwwww its so quicker to learn when told the answer

    Did you mean read the "main" page?

  4. #4
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    I'm assuming it copies to main directory to a temp and then the main gets erased? Is that right?

  5. #5
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    no, manual page

    (almost) any linux command has at least one, and a lot of other topics as well.
    It´s usually the first ressource one reads to gather information.

    Open a terminal and type
    Code:
    man rm
    You must always face the curtain with a bow.

  6. #6
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    I'm assuming it copies to main directory to a temp and then the main gets erased? Is that right?
    Well, the second part is right.
    You must always face the curtain with a bow.

  7. #7
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    ah rm removes each specified file! sneaky question then! thanks Irithori, picking up this a bit better now i hope.

  8. #8
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Yes, the space between / and mytmpdir make that two arguments for rm.
    And -R tells it to recurse and -f to force delete.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...