Re: How to delete a special directory

"Darío Mariani" <[email protected]>
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
What about rm -rf "-r" "-f"?
If not, a file manager like Midnight Commander should do the trick.

On 2/9/07, Glynn Clements <[email protected]> wrote:
>
> 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 <[email protected]>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.