LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-29-2007, 03:37 PM   #1
neologic
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
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,879

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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
neologic
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
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
Try:

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
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Or use backslash.
 
  


Reply


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


All times are GMT -5. The time now is 10:36 AM.

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