LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-03-2009, 11:26 PM   #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-03-2009, 11:46 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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, 01:45 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

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

also works
 
  


Reply



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

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

All times are GMT -5. The time now is 11:03 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
Open Source Consulting | Domain Registration