>Hi. I'm having trouble deleting (or doing anything with) files with
>special characters in the name.
>I am using tcsh on a Mac OS 10.1 computer.
>When I hit Control-D, I get a list including the file I'm trying to
>delete. However, neither ls of the directory, wildcard completion, or
>trying to escape the characters helps.
>Output from Sc<ctrl-d>:
>Sch\355\265\261\355\277\211st.txt
>Output from 'ls .':
>ls: Sch??st.txt: No such file or directory
>Output from 'ls Sc*':
>ls: No match.
The wild-card should expand.
Either the OS is broken, or your filesystem is corrupted.
To test the former you could try making a temporary
directory and put a file with a similar name in there;
$ mkdir test
$ cd test
$ : >`echo 'TEST_abcade' |tr 'abcde' '\355\265\261\277\211'`
$ ls TEST_*
To test the later you can run some of the file system
diagnostics on your drive and check everything is okay.
It seems to me that they've added a 16-bit character
thing to the OS, that is indicated by the \355 character.
You might want to skim through the shell man page and
have a look at the file pattern expansion sections;
for example there may be an option that enables '*'/'?'/...
to expand these special 16-bit characters. Otherwise there
might at least be some information about it...
Quote:>Any idea how to delete files with the above names?
I would find out how to delete them and then make sure
you stop whatever put them on there from putting them
on there again.
Can you delete them from the GUI?
If the file I suggested you created above shows the
exact same behaviour as the ones you are trying to
delete, one thing you could try next is;
$ cd .. # get out of the 'test' directory
$ rm -r test # try to delete it
If that workz, a way to fix your problem is to
simply move all good files out of the directory
leaving only the odd ones you want to delete, then
you can 'rm -r' the whole directory to kill them.
regards
--
# if you are bored crack my sig.
1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A
EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E
630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA
8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978
80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492