![]() |
|
|
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 |
| parse a file for a special character | melanie_pfefer | Shell Programming and Scripting | 9 | 10-10-2008 04:00 AM |
| special character on Filename.. help!!!urgent | genzbeat | HP-UX | 1 | 01-18-2008 03:55 PM |
| Special character in my file | Ryan2786 | UNIX for Dummies Questions & Answers | 3 | 07-06-2007 12:35 AM |
| delete a special character in file | srivsn | Shell Programming and Scripting | 1 | 03-15-2006 06:45 AM |
| Mount a character special file | MuellerUrs | SUN Solaris | 1 | 07-15-2005 01:36 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to copy/move to a file with a special character as the 1st char in the filename?
I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell.
I am able to create files with special characters in the filenames...e.g. cp -pv foo.gif \*special.gif cp -pv foo.gif \ blank.space.start.gif I cannot create this filename: -special.filename.txt The cp or mv command thinks that the '-' character specifies a flag. I've tried the following commands: cp -pv foo.bar \-special.txt (this results in a filename of '\-special.txt') cp -pv foo.bar '-special.txt' (cp thinks '-special.txt' is an invalid option) cp -pv foo.bar '\-special.txt' (the result is the same as \-special.txt) This might be a simple question but does anyone know how to create a file, either by cp or mv, with a filename that has the dash '-' character as the first character in the filename? |
| Bookmarks |
| Tags |
| linux commands, shell script, shell scripting, sqa777, unix commands, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|