Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-29-2007, 03:37 PM   #1
LQ Newbie
Registered: Sep 2007
Posts: 3

Rep: Reputation: 0
weird question

Please, anyone knows how can I remove "--help" file with rm?
I created it when I tried to read --help screen of "import" from imagemagick
Old 09-29-2007, 03:40 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If rm is refusing to remove the file because of the lead hyphens, try renaming the file, then rm it.
Old 09-29-2007, 03:47 PM   #3
LQ Newbie
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, it works, but is there any way to remove such file without renaming it ? I'm just curious
Old 09-29-2007, 04:30 PM   #4
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53

rm -- weirdfilename

That disables interpreting - and -- as command line options - everything after the -- is considered part of the filename.
Old 09-29-2007, 08:48 PM   #5
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
this works too:
rm ./--help

And quite often it can be made to work by surrounding the file with quotation marks.

Last edited by jay73; 09-29-2007 at 08:49 PM.
Old 09-30-2007, 03:44 AM   #6
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Or use backslash.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache question, weird log justanothersteve Linux - Security 2 02-26-2006 06:13 PM
How do you pronounce /etc ? Weird question, I know... QtCoder Linux - General 24 11-25-2003 10:03 PM
NFS/SMB weird question Mutiny Linux - Networking 2 03-23-2003 12:03 PM
Weird Samba Question biggiefatts Linux - Networking 3 01-20-2003 10:11 AM
weird question: where does the name 'RedHat' come from ??? jernst Linux - Distributions 3 11-28-2002 09:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration