> Richard B. Johnson wrote:
> > # ls /tmp/*.bak
> > ls: /tmp/*.bak: No such file or directory
> > # ls /dos/drive_C/*.bak
> > ls: /dos/drive_C/*.bak: Invalid argument
> > # exit
> > exit
> >
> > Script done on Fri Dec 5 19:34:44 1997
> >
> > Synopsis:
> > `ls` for a nonexistant file under ext2 results in ENOENT.
> > `ls` for a nonexistant file under msdos results in EINVAL.
> > NotGood(tm)
>
> Apparently what happens is that when no files match the pattern *.bak,
> ls tries to stat the name '*.bak', which is an invalid filename under
> DOS.
>
> Doing an ls on 'fooble' or other nonexistent names returns "no such
> file".
>
> Regards,
> Bill
>
But filename.bak or FILENAME.BAK or *.BAK, etc, are not invalid names
under MS-DOS.
The relatively new behavior makes scripts that contain :
rm -f *.bak
... on a MS-DOS file-system fail because rm ignores ENOENT (only) when
using the (f)orce option. I can modify rm, but this is not the correct
fix.
Cheers,
Dick Johnson
Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.1.70 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.