linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: linux-admin@vger.kernel.org
Subject: Re: How to delete a special directory
Date: Fri, 9 Feb 2007 16:59:26 +0000	[thread overview]
Message-ID: <17868.43118.323258.262049@cerise.gclements.plus.com> (raw)
In-Reply-To: <C1F1DAF5.E66F%kweston@innerwall.com>


Karey Weston wrote:

> >> I've accidently created two directories: -f and -q
> >> 
> >> Now, i can't remove them with rm -rf -f -q
> >> I get an error.
> >> 
> > 
> > Try giving the full path name to the directory.  Such as,
> > rm -rdf ./-f ./-q
> 
> Try this (works with bash on BSD...Linux should be the same)
> 
>  rm -rf \-f \-q
> 
> Make sure you are in bash...the backslashes escape the - and take it as a
> literal.

That won't work. The dashes are significant to "rm", not the shell. 
The backslashes will be removed by the shell, and won't affect the
arguments which "rm" sees.

I have no idea why this would work on BSD; bash is bash, regardless of
the underlying OS.

-- 
Glynn Clements <glynn@gclements.plus.com>

  reply	other threads:[~2007-02-09 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09 14:29 How to delete a special directory Mário Gamito
2007-02-09 14:33 ` Scott Pack
2007-02-09 15:01   ` Karey Weston
2007-02-09 16:59     ` Glynn Clements [this message]
2007-02-09 17:15       ` Darío Mariani
2007-02-09 18:07         ` Glynn Clements
2007-02-09 14:35 ` Florian Klien
     [not found] ` <200702090934.43065.doug@hunley.homeip.net>
2007-02-09 17:22   ` Mário Gamito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17868.43118.323258.262049@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).