![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Weird Ascii characters in file names | yamsin789 | Shell Programming and Scripting | 2 | 10-07-2007 07:27 AM |
| how to delete record in file data with index in another file? | zhynxn | Shell Programming and Scripting | 0 | 07-05-2006 09:03 PM |
| i want to delete a file based on existing file in a directory | srivsn | Shell Programming and Scripting | 3 | 04-11-2006 01:38 AM |
| Weird File | rahulrathod | UNIX for Dummies Questions & Answers | 5 | 01-20-2006 07:28 AM |
| Get file from source server and delete the ftp file | lweegp | Shell Programming and Scripting | 3 | 10-16-2005 11:53 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to delete a weird file name
Hi,
How do I delete a file name that starts with a hypen? e.g. -unix_file_2006_10_3 I always get an erroe when I use rm command. I am using Solaris. Thanks, Hi, One of the Unix books I read to remove this weird file suggest to use: "rm ./-unix_file_2006_10_3" which I did today and file went away. According to the book the "./" just say " in this directory" that is all it does -without it Unix thinks that the dash is an option of some unix commands that was erroneuosly entered. Thanks you all for responding. Last edited by XZOR; 10-06-2006 at 10:33 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Don't know about solaris, I am using RHEL.
I did it like this: in GNOME locate the file. press the almighty del key... it does it... |
|
#3
|
||||
|
||||
|
Quote:
rm "-unix_file_2006_10_3" if that does not work, try: rm \-unix_file_2006_10_3 if you still get the error, post the error here |
|
#4
|
||||
|
||||
|
try
rm -- filename |
||||
| Google The UNIX and Linux Forums |