![]() |
|
|
|
|
|||||||
| 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 |
| escaping special characters in file name... | lau0001 | Shell Programming and Scripting | 1 | 01-19-2008 05:54 PM |
| Removing special characters in file | srivsn | Shell Programming and Scripting | 6 | 01-03-2008 03:10 AM |
| Replace Special characters in a file | solai | UNIX for Dummies Questions & Answers | 1 | 07-13-2006 07:36 AM |
| how to see special characters in a file using vi | jingi1234 | UNIX for Dummies Questions & Answers | 6 | 10-19-2005 08:57 AM |
| search special characters in a file | cramya80 | UNIX for Dummies Questions & Answers | 2 | 05-13-2005 09:08 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
How to delete a file with special characters
I don't now exactly how I did it, but I created a file named " -C "
cexdi:/home1 $ls -lt total 1801336 -rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C How do I delete this file ? cexdi:/home1 $rm -C rm: invalid option -- C Syntax : rm [-Rfir] filename ... Doesn't work... I'm stuck. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Found it.
bash-3.00# mkdir tata bash-3.00# cd tata bash-3.00# rm ../"-C" |
|
#3
|
|||
|
|||
|
many ways of doing it,
1) give the full path and delete 2) find the inode no and delete through that 3) rm \-C |
|
#4
|
|||
|
|||
|
Long way.
Do a rm -i. This will prompt you 1 file at a time. Works good if dirs are small or your scared of what might happen. -X |
|
#5
|
|||
|
|||
|
two very ways to do this:
1.) rm -- -r 2.) rm ./-r Beauty lies in Simplicity!!!!!! |
|
#6
|
||||
|
||||
|
You can delete filename with full path
let me see rm <filename_path> <filename> or rm <filename_path> *-C Regards, Siva.P Bangalore |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|