Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
My mates were having a giggle about this picture and won't tell me what the command means. Would anybody here care to tell me what the command means I would ...
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Location
    QLD, Australia
    Posts
    43

    Ubuntu command

    My mates were having a giggle about this picture and won't tell me what the command means.

    Would anybody here care to tell me what the command means I would really like to know what is so funny about it.

    Thank you for your time and sorry about the trivial post but google turns up nothing important when I type in that post.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,101
    Just... dont type that command.

    Rather read the man page to rm
    Code:
    man rm
    rm MAN Page
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Sep 2010
    Location
    QLD, Australia
    Posts
    43
    Quote Originally Posted by Irithori View Post
    Just... dont type that command.

    Rather read the man page to rm
    Code:
    man rm
    rm MAN Page
    Thanks for that but one more question.

    If the rm means remove and the -rf tells it to do so recursively, well how does it delete something recursively, once its deleted isn't it gone?

  4. #4
    rrl
    rrl is offline
    Just Joined!
    Join Date
    May 2011
    Location
    NJ
    Posts
    45
    This would delete the parent directories and all the subdirectories in it. Everything. rm or rmdir deletes empty directories. You will get an error trying to delete a folder with contents using the rm command.

  5. #5
    Just Joined!
    Join Date
    May 2011
    Posts
    44
    Quote Originally Posted by Vikeyev View Post
    Thanks for that but one more question.

    If the rm means remove and the -rf tells it to do so recursively, well how does it delete something recursively, once its deleted isn't it gone?
    -f means force, just obliterate.

    -r means remove recursively.
    you may want to review recursion:
    Recursion - Wikipedia, the free encyclopedia

    rm -r /home/foo effectively translates to:
    Code:
    rm /home/foo/bar/path/to/some/nested/path/*
    rm /home/foo/bar/path/to/some/nested/path
    rm /home/foo/bar/path/to/some/nested/*
    rm /home/foo/bar/path/to/some/nested
    rm /home/foo/bar/path/to/some/*
    rm /home/foo/bar/path/to/some
    rm /home/foo/bar/path/to/*
    rm /home/foo/bar/path/to
    rm /home/foo/bar/path/*
    rm /home/foo/bar/path
    rm /home/foo/bar/*
    rm /home/foo/bar
    rm /home/foo/*
    rm /home/foo

  6. #6
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,073
    If you really want to know what it does: YouTube
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  7. #7
    Just Joined!
    Join Date
    Jun 2011
    Posts
    5

    whats the use of this

    as someone above said that when you type -r then it means recursively that is
    firstly the files in the directory will be deleted and then the folder itself and then the files along with the folder in the directory and so on.

    What is the use of this, don't you think it is stupid.. It would be much better if there is a command that deletes all what we want to delete at once that is without recusion.

  8. #8
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,101
    all what we want to delete at once that is without recusion.
    I dont get what you are saying.
    Can you make an example?
    -r, -f and the combination of both make perfect sense to me as they are working now.
    You must always face the curtain with a bow.

  9. #9
    Just Joined!
    Join Date
    Jun 2011
    Posts
    5
    According to user : "three18ti"

    The command is deleting the directory one by one, which might take a long time. So its a stupid command according to me.
    Hence Recursion is useless according to me.

    It would be better if the command deletes the files without recursion i.e without -r, because without recursion it don't deletes the files in steps like three18ti showed above.
    Hence the process would be much faster according to me.

  10. #10
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,101
    If you use -r, then you explicitly tell rm to delete recursively.
    Yes, this takes time, as
    a) there is more to do
    b) the datastructure (filesystem) needs to be kept consistent.
    You must always face the curtain with a bow.

Page 1 of 2 1 2 LastLast

Posting Permissions

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