|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to remove a file with a leading dash '-' in it's name?
Somehow someone created a file named '-ov' in the root directory.
Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option -- o or v" errors. It appears that the '-' dash is being treated as options to my rm command. If the p.o.s. file was in most any other directory I'd just move everything else out to somewhere then blow away the directory and re-make it and begin the stuff back. Can't really do that with the root directory <g>. Anyone have any other ideas on how it can be make to go away? System is an Esix System V Release 4 box but I don't think that matters. Thanks. Geo. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Use the full pathname
rm /-ov
|
| Sponsored Links | ||
|
|
#4
|
|||
|
|||
|
Thanks.
I used the rm /-ov. I feel stupid (guess i am)<g>. I just never tried the obvious. G. |
| Sponsored Links | ||
|
![]() |
| Tags |
| cpio |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove leading zeroes in 2nd field using sed | pchang | Shell Programming and Scripting | 18 | 10-04-2010 05:13 PM |
| How to concatenate string containing a leading dash? | wolfv | Shell Programming and Scripting | 5 | 12-05-2009 04:50 PM |
| Not able to remove leading spaces | panyam | Shell Programming and Scripting | 5 | 05-28-2009 05:14 AM |
| remove dash | melanie_pfefer | Shell Programming and Scripting | 1 | 01-26-2009 05:05 AM |
| sed over writes my original file (using sed to remove leading spaces) | laser | Shell Programming and Scripting | 6 | 12-02-2008 09:48 AM |
|
|