![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find special characters?? | sumitc | AIX | 3 | 05-04-2008 08:20 PM |
| Display special characters | BCarlson | Shell Programming and Scripting | 2 | 10-06-2006 09:59 AM |
| Special Characters in directory name | tez | UNIX for Dummies Questions & Answers | 6 | 08-14-2006 07:06 PM |
| special characters | nawnaw | UNIX for Dummies Questions & Answers | 2 | 05-18-2004 03:17 PM |
| awk/sed with special characters | apalex | Shell Programming and Scripting | 5 | 05-06-2002 04:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Remove directory that has special Characters
Hi All,
I have a script written that creates a new directory within the shell program and if a parameter isn't passed in, it creates a strange directory name by mistake. So I have a directory like "-_12" and I am unable to remove it. I tried removing it using double quote and many others. I have been faced with this before but unsure how it was done correctly to remove it. $ rmdir -f -_12 rmdir: illegal option -- _ rmdir: illegal option -- 1 rmdir: illegal option -- 2 Usage: rmdir [-fip] dirname ... or trying to cd into this directory... $ cd -_12 ksh: cd: bad option(s) |
|
||||
|
I did try that... $ rmdir -f \-_12 rmdir: illegal option -- _ rmdir: illegal option -- 1 rmdir: illegal option -- 2 Usage: rmdir [-fip] dirname ... I even thought of this one as well.... $ rmdir -f \-\_12 rmdir: illegal option -- _ rmdir: illegal option -- 1 rmdir: illegal option -- 2 Usage: rmdir [-fip] dirname ... Thanks for trying... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|