Re: Re; Cannot erase files

From: Bill Vermillion (bv_at_wjv.comREMOVE)
Date: 05/16/03


Date: Fri, 16 May 2003 13:55:09 GMT

In article <ba28sm$6ah$1@sparta.btinternet.com>,
Ian Wilson <scobloke2@infotop.co.uk> wrote:
><snipped and edited and resynthesized almost beyond recognition>

>JPR: I'd say it's far more likely that there are hidden characters in those
>JPR: file names. Try 'ls -b'.

>SM: # ls -b
>SM: hawis.EAN\2479007473043207.20020801.120000
>SM: hawis.HERST\2479007473043207.20020801.120000

>WJV: ... look carefully at the above file
>WJV: listing. [duplicated here]
>WJV: hawis.EAN\2479007473043207.20020801.120000
>WJV: ^^^^

>WJV: The file has a not priting character with the octal value of 247.
>WJV: That is indicated by the \ and the 3 digits.

>This is a weird problem. I can create filenames with that character in
>them (Alt+0167 according to Windows calc) but I cannot reproduce the
>display nor the ls error reported by SM.

Unix file system names are limited to printable character - eg
those below decimal 127.

The only non-permitted character in a Unix file name is / as it
used by directories. It is also advisable not to use anything
outside the displayable ASCII parameters - decimal 30 through
decimal 176 and omitting all characters associated with
punctuation, etc.

It matters not if Windows will let you create them and use them -
but they are going to be exceptionally difficult to >use< in Unix
systems.

>19$ touch 'aaa^Gbbb' 'aaa§bbb'
>20$ ls -lb
>total 0
>-rw-r----- 1 ian group 0 May 16 09:27 aaa\007bbb
>-rw-r----- 1 ian group 0 May 16 09:27 aaa§bbb
>21$ ls -l
>total 0
>-rw-r----- 1 ian group 0 May 16 09:27 aaabbb
>-rw-r----- 1 ian group 0 May 16 09:27 aaa§bbb

>(filename with ASCII BEL is for comparison purposes)

>On my OSR505 account my \0247 shows as Code Page 437 underlined degree
>symbol (when viewed through Teraterm 2.3 using the Terminal font)

>In Mozilla news client for Windows, my cut and pasted \0247 shows as a
>Latin-1 'section sign'

>In the OP posting I see the \0247 shown as an ASCII apostrophe - I guess
>the most significant bit is dropped somewhere - something is not 8-bit
>clean?

>Anyway, how do I make ls -l complain that it can't find the file?

Don't use characters not recognized in Unix systems.

>Tony's explanation ("munged filesystem") looks more convincing
>to me at the moment. I'm just not willing to munge my filesystem
>to find out :-)

Have you tried my suggestion of the wild card? It should work.

Next to worst case is to use the -i option to 'ls' and then
perform a find . -inum -exec rm {} \; to nuke that file.

Worst case is to find the inode and then clear it, but leave that
to someone who knows a bit more about the system, as it will
require a reboot and and fsck to make everything right. That's why
I say it is worst case.

I've stumbled across things like your problem where users have
accidentally created non-conformant file names off and on in the
20 years I've been using Unix.

Stick with a universe of upper and lower case alpha and numeric
characters.

-- 
Bill Vermillion - bv @ wjv . com


Relevant Pages

  • Re: writing to pipe [OT]
    ... -u Ignored; for Unix compatibility. ... `^' notation and precede characters that have the ... Display a `$' after the end of each line. ... --help Print a usage message and exit with a status code ...
    (comp.lang.c)
  • Enhanced JCL processor? (and maybe a few other thoughts)
    ... I would prefer that JCL be VB. ... The first three characters of the ... // THE PARM' ... UNIX user" is defined, then it is the "default UNIX user's" home ...
    (bit.listserv.ibm-main)
  • Re: qx() wont accept over (about) 128,000 characters
    ... and submit the result to a Unix operating system ... I submit such a program to the operating system using Perl's ... Unfortunately, giving qxover 128,420 characters (about and can vary ... $ perl -e' ...
    (perl.beginners)
  • Re: Barcode printing: Unix to HP?
    ... They are passed as a Hex A2 and Hex A4, respectively, (and show ... All I'm getting are the data characters ... and check character in the barcodes, ... Are there any print queue settings on the Unix side I need to change? ...
    (comp.unix.aix)
  • Re: What is the maximal length of usernames on Solaris?
    ... How many characters do they need to truncate from ... >partly done already, at least on some Unix implementations, but doing the ... >coordinated as part of the standards process. ... >a pretty good job of making most of its customizability accessible to the ...
    (comp.sys.sun.admin)