![]() |
|
|
|
|
|||||||
| 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 a weird file name | XZOR | UNIX for Dummies Questions & Answers | 3 | 10-05-2006 11:35 PM |
| HP-UX weird FTP ? | IngmarMeins | HP-UX | 10 | 11-29-2005 05:22 PM |
| weird core | nkshirsagar | HP-UX | 1 | 10-05-2005 11:33 PM |
| Weird script | Duckman | UNIX for Dummies Questions & Answers | 2 | 03-14-2001 10:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
$ls -lrt
-rw-r--r-- 1 rathodr users 1757 Jan 6 13:36 cleanup.archive.files.pl -rwxr-xr-x 1 rathodr users 20503 Jan 6 13:52 alarm.control.pl -rw-r--r-- 1 rathodr users 20503 Jan 9 04:52q The last file seems to be a weird file. I am not sure how was it created. Maybe while quiting vi. $rm q q: No such file or directory $ file * alarm.control.pl: executable /u01/perl/bin/perl script cleanup.archive.files.pl: executable /u01/perl/bin/perl script q: executable /u01/perl/bin/perl script This displays the type of file. But I am not able to do any operation on the file nor delete it. Has anybody faced such a situation? Thanks, Rahul. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
there can be some special characters in the file name which won't be visible sometimes...
try to remove using rm -i *q* |
|
#3
|
|||
|
|||
|
It worked
Thanks.
But I am curious to know what kind of special character this file consists, and why it doesn't get deleted the normal way? Rahul. |
|
#4
|
||||
|
||||
|
Had to try some stuff here; but got it. Try this:
Code:
touch \<backspace_key>q To see what special characters a filename has, use Code:
ls -l | cat -v |
|
#5
|
||||
|
||||
|
Quote:
Cheers ZB |
|
#6
|
||||
|
||||
|
To delete a file with special characters in its name, you can do :
Code:
$ ls -lib
total 0
137362 -rw-rw-r-- 1 gssjgu gsb4001 0 20 jan 15:21 filename whith backspace \010
137370 -rw-rw-r-- 1 gssjgu gsb4001 0 20 jan 15:19 filename with spaces
$ find . -inum 137362 -exec rm {} \;
$ ls -lib
total 0
137370 -rw-rw-r-- 1 gssjgu gsb4001 0 20 jan 15:19 filename with spaces
$
|
||||
| Google The UNIX and Linux Forums |