Advanced

How to Delete a Directory in Linux

Posted by linuxsavvy on · 9 comments
technonstop.com; By Abdullah Chougle
Mail this story
Print this story

This short tutorial talks about using the "rm" command to remove directories in Linux.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (9)

I didn't know about that -- is it a relatively new feature?
That's an old bash-ism, Bernard. I knew about it a way long time ago, and then forgot until I read this. Very cool!
The article makes it look as if it is part of the rm command. I believe it has been part of the bash shell syntax for aliases for a while

http://www.cyberciti.biz/faq/ignore-shell-aliases-functions-...

[edit: batch => bash] :-)
fettoosh: why do you think that? to me To run the original rm command use “\rm” clearly makes this something not part of rm.

indeed an interesting feature, i didn't know about either. i tent to use rm -rf to override the -i which is a bad idea and i always hate doing it. i'll have to remember this one!

greetings, eMBee.
Quoting:fettoosh: why do you think that?


Simply because he didn't explain the fact that, in bash shell, the backslash escapes aliases just as it escapes special characters. This is not obvious and not really mentioned in "man bash" documentation.

Or simply working too hard on a Saturday.



@fettoosh: Thank you for your comment. I've added a line to my article explaining the use of the backslash in bash.
man bash and the Bash Reference Manual don't explain this particular use of the backslash, at least not directly. It may be inferred somewhere, but not in a way I can understand.
Oh, Fettoosh said that. Or there is an echo in here :)
Quoting:I've added a line to my article


Perfect, now your snippet article is twice as valuable by publicizing an obscure bash feature. It comes in very handy when executing batch jobs(non-interactive). [edited: added previous].

Quoting: Fettoosh said that...


@tuxchick

I did the same with my first comment above. Your comment wasn't there when I started but was when l posted mine 20 minutes after. I was called upon. :-)



Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post