[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to remove a file



Ehrm....   'rm -f *' ????     ;-)

It's a sure way to get rid of that file... (OK, the rest will be gone as well, but no need to go in to petty details! <G>)

But actually, to be a total **** (Censored for decency) have you considered trying 'man rm' ???  *GASP* (I know, reading a manual sound like blasphemy, but it's what they're there for!)
The manual pages actually contain useful information such as:

<Quote>
       GNU rm, like every program that uses the  getopt  function
       to  parse  its  arguments,  lets  you use the -- option to
       indicate that all following arguments are non-options.  To
       remove  a  file  called `-f' in the current directory, you
       could type either
              rm -- -f
       or
              rm ./-f
       The Unix rm program's use of a single `-' for this purpose
       predates the development of the getopt standard syntax.
</Quote>

--FP


David Schwartz wrote:
Please help me in removing a file which is named as "-file1.tar".
    

  
This file got created accidentally. I am unable to remove this file.
So please suggest a way to remove such files.
    

  
Thanks in advance.
Sugunakar Ambati
    

	There are so many ways to do this that I'm surprised you couldn't even
think of one. The simplest is:

	rm -- -file1.tar

	Also good is:

	rm ./-file1.tar

	Things that won't work include:

	rm ?file1.tar
	rm -i *file1.tar
	rm \-file1.tar

	DS



  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]