[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: remove file with special name
- From: Fred Smith <fredex fcshome stoneham ma us>
- To: redhat-list redhat com
- Subject: Re: remove file with special name
- Date: Tue, 29 Sep 1998 16:00:41 -0400
On Tue, Sep 29, 1998 at 09:43:30AM +0200, Hugo Coolens wrote:
> 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,
Yeah, lotsa people have trouble with this. But think of the different
ways you can refer to a file. For example, given an arbitrary file you
can refer to it by its filename, by its filename with a "./" in front of
the name (if it is in the current directory), or by its absolute
pathname "/usr/foo/bar".
So, in this case there are several ways to do it:
rm ./-name
rm /usr/junk/mydir/-name
rm -- -name
rm -i * # then answer 'y' or 'n' for each file
Fred
--
---- Fred Smith -- fredex fcshome stoneham ma us ----------------------------
"For the word of God is living and active. Sharper than any double-edged
sword, it penetrates even to dividing soul and spirit, joints and marrow;
it judges the thoughts and attitudes of the heart."
---------------------------- Hebrews 4:12 (niv) ------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]