View previous topic :: View next topic |
Author |
Message |
Judge584 Tux's lil' helper
Joined: 18 Apr 2005 Posts: 109
|
Posted: Fri Jan 09, 2009 8:56 am Post subject: How to delete a file beginning with a "-"? |
|
|
Hi,
Someone have created a file named "-toto" on a production server.
I want to delete this file, but the "-" is giving me troubles.
How to delete such files beginning with special character?
Many thanks... |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Fri Jan 09, 2009 8:59 am Post subject: |
|
|
|
|
Back to top |
|
|
pholthau Guru
Joined: 27 Nov 2005 Posts: 361 Location: Bielefeld, Germany
|
Posted: Fri Jan 09, 2009 9:05 am Post subject: |
|
|
or
or
_________________ The message is Feierei, alder! The message is Gude Laune, alder! [Sven] |
|
Back to top |
|
|
Judge584 Tux's lil' helper
Joined: 18 Apr 2005 Posts: 109
|
Posted: Fri Jan 09, 2009 9:09 am Post subject: |
|
|
Many thanks!
I beleive the pholthau answer is the good one, because the two answers works.
Veldrin:
Thanks, but I'm not sure it works...because if i do a:
ls \-toto, the it list my entire directory instead of the file. |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Fri Jan 09, 2009 9:22 am Post subject: |
|
|
sry for the confusion. I though it worked...
*notes how to delete file with a leading dash* |
|
Back to top |
|
|
Judge584 Tux's lil' helper
Joined: 18 Apr 2005 Posts: 109
|
Posted: Fri Jan 09, 2009 1:42 pm Post subject: |
|
|
Don't be!
Many thanks. |
|
Back to top |
|
|
|