[plug] Filename star

Steve Grasso steveg at calm.wa.gov.au
Tue Jan 4 17:34:53 WST 2000


>How do you search for files, with meta characters as their names?
>
>Any tips, ideas and experiences appreciated.

This happened to me a little while ago and someone may find the fix useful:

A file with no name (blank, but not a space) was mysteriously created by 
the web server (running as nobody) in my web space, but on a machine for 
which I did not have root access.

Using ls -bal revealed that the filename was \015\015 (octal), which is a 
double carriage return ie ctrl-m twice. A quick perl script hack run via 
the offending web server ie as nobody effected a rename to something more 
accessible. Then I could cat the file to find out what was going on (turned 
out to be a glitch in a CGI).

The moral of the story is that ls -b (which lists non-printable characters 
in filenames as escaped octal sequences) will reveal the filename of files 
named with 'invisible' characters.

Steve



More information about the plug mailing list