[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: remove file with special name
- From: "NAGENDRA .S . TOMAR" <tomer csa iisc ernet in>
- To: redhat-list redhat com
- Subject: RE: remove file with special name
- Date: Thu, 1 Oct 1998 08:19:51 +0530 (IST)
On Wed, 30 Sep 1998, Merten, Joe wrote:
> Date: Wed, 30 Sep 1998 16:58:59 -0400
> From: "Merten, Joe " <Joe_Merten sealand com>
> Reply-To: redhat-list redhat com
> To: redhat-list redhat com, "'Kevin W. Reed'" <soldo telesys tnet com>
> Subject: RE: remove file with special name
> Resent-Date: 30 Sep 1998 21:01:51 -0000
> Resent-From: redhat-list redhat com
> Resent-cc: recipient.list.not.shown:;@redhat.com
>
> OK, I'll admit I'm a newbie, and I didn't believe that it wouldn't work
> until I tried it...
>
> Would anyone care to explain WHY it doesn't work? When I try "rm *name" I
> get:
> rm: illegal option -- n
> rm: illegal option -- a
> rm: illegal option -- m
> rm: illegal option -- e
>
> ==========================================================
> Joseph P. Merten | Good decisions come from experience.
> Sea Land 704-571-2333 | Experience comes from bad decisions.
>
> > ----------
> > From: Kevin W. Reed[SMTP:soldo telesys tnet com]
> > Sent: Wednesday, September 30, 1998 2:39 PM
> > To: redhat-list redhat com
> > Subject: Re: remove file with special name
> >
> > Told to us by Ken Smith (coe uniserve com)
> > on Wed, Sep 30, 1998 at 11:02:13AM -0700
> >
> > > Pete,
> > > providing that you don't have any other files in the directory that
> > end
> > > with "name" then you could try:
> > >
> > > rm *name
> > >
> > > or possibly
> > >
> > > rm ?name
> > >
> > > either one should work!
> >
> > I love helpful replies that don't bother to lookup the "Correct" answer
> > and make statements that "either one should work!"...
> >
> > Did you actually try it before making this suggestion??
> >
> > If you had, you wouldn't have posted the message... cause it doesn't work
> > for the same reason his other attempts didnt either.
> >
> > The answer however is really really simple and is located in the man page
> > of rm of all places? Imagine that!
> >
> > A quick look at the man page for rm will show....
> >
> > GNU rm, like every program that uses the getopt function
> > to parse its arguments, lets you use the -- option to
> > indicate that all following arguments are non-options. To
> > remove a file called `-f' in the current directory, you
> > could type either
> >
> > rm -- -f
> > or
> > rm ./-f
> >
> > The Unix rm program's use of a single `-' for this purpose
> > predates the development of the getopt standard syntax.
> >
> >
> > Gee... That sounds like the answer to the original question...
> >
> >
> > > From: Pete <plaven idl net au>
> > >
> > > > By incident I created a file with the name -name, how can I remove
> > this
> > > > file? I tried with rm \-name however this doesn't work.
> > > > Any suggestion?
> > > > regards,
> > > > hugo
> >
> > --
> > ==========================================================================
> > Kevin W. Reed (KWR10) TNET Service - Disability Systems and
> > E-Mail: soldo TNET COM Software Development
> > WEB: http://www.tnet.com MAJORDOMO - MAILBOT Administration Account
> >
>
>
> --
> PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
> To unsubscribe: mail redhat-list-request redhat com with
> "unsubscribe" as the Subject.
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
NAGENDRA .S. TOMAR
ROOM B-9
BOYS HOSTEL
INDIAN INSTITUTE OF SCIENCES BANGALORE
DIAL NO:3092431
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
this is so because the shell wild card expansions
are the first thing that will be done before a
command is executed so
rm *name expands to rm -name
hence the errors...
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]