LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-04-2009, 12:26 AM   #1
manoj_isi
LQ Newbie
 
Registered: May 2008
Posts: 8

Rep: Reputation: 0
how to ls/cat/rm a file named "--help"


I was wondering how to "ls" or "cat" or "rm" a file whose name is "--help" ???
 
Old 06-04-2009, 12:46 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Code:
rm -- --help
From the man pages for rm:
Code:
POSIX OPTIONS
       -f     Do not prompt for confirmation. Do not write diagnostic messages.  Do not produce an error return status
              if the only errors were nonexisting files.

       -i     Prompt for confirmation.  (In case both -f and -i are given, the last one given takes effect.)

       -r or -R
              Recursively remove directory trees.

       --     Terminate option list.
 
Old 06-04-2009, 02:45 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos
Posts: 270

Rep: Reputation: 54
rm -i ./--help

also works
 
  


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
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 07:58 AM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 08:27 AM
"cat" a file without first line loopoo Linux - General 5 12-05-2005 08:04 AM
bash redirection "$ cat << EOF > file" (how does this work) ninmonkeys Linux - General 1 11-09-2004 04:37 PM
An existing file in the PWD isn't displayed with "cat".. linuxharsha Linux - General 2 02-17-2004 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 PM.

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