I'm having an issue using wildcards (especially ' * ') when listing
file under AIX on a CIFS share under Windows 2003 server.
The problem (see below for an example) is reproducible.
Does anyone have had the same problem?
Is this a bug?
Note that I'm not the sysadmin: I can't change the CIFS configuration
(because it's a production server).
------------------------8<------------------------
myuser@mymachine:/home/myuser >cd /cifs
myuser@mymachine:/cifs/ >ls
FM_M.TXT FM_M.old FM_S.TXT FM_S.old
myuser@mymachine:/cifs/ >echo "TEST" > SALES.TXT
myuser@mymachine:/cifs/ >ls
FM_M.TXT FM_M.old FM_S.TXT FM_S.old SALES.TXT
myuser@mymachine:/cifs/ >ls FM*
FM_M.TXT FM_M.old FM_S.TXT FM_S.old
myuser@mymachine:/cifs/ >ls Sa*
Sa*
myuser@mymachine:/cifs/ >echo $?
0
myuser@mymachine:/cifs/ >ls SaL*
SaL*
myuser@mymachine:/cifs/ >echo $?
0
myuser@mymachine:/cifs/ >ls SAL*
SALES.TXT
myuser@mymachine:/cifs/ >echo $?
0
myuser@mymachine:/cifs/ >rm SALES.TXT
myuser@mymachine:/cifs/ >ls Sa*
ls: 0653-341 The file Sa* does not exist.
myuser@mymachine:/cifs/ >echo $?
2
myuser@mymachine:/cifs/ >echo "TEST" > SALES_TEST.TXT
myuser@mymachine:/cifs/ >ls Sa*
Sa*
myuser@mymachine:/cifs/ >ls SALES_*
SALES_TEST.TXT
------------------------>8------------------------
++
looks fine ? or do you expect "ls" to ignore case ?
Definitly yes!
AIX's cifs-client is really broken. I reported some issues to IBM.
Look at:
IY66405
IY72199
IY73024
IY77474
IZ25282
I have never seen this one with the wildcards. In seems,
that the client passes the '*' to the Server for expansion,
but does not correctly handle the result. This results in
showing 'Sa*' as existing file. Even worse, trying
cat Sa*
will result in an infinite loop!
Since I am in the process of moving from AIX to Redhat, I will not
report this to IBM. Explaining errors like this to IBM's support is
really timeconsuming.
If your shell ist bash you can try as a workaround:
shopt -s nocaseglob
This will do case insensitive wildcard expansion at the shell
level, thus not passing any '*' to the cifs client.
Cheers
Heinrich
--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
Hi!
Thank you for the answers.
Henry, look at Heinrich's answer for more information about the bug,
especially the cat infinite loop (problem that I have as well).
Let's follow the future versions.
Bye (und Danke sehr ;)
--
jeangui.
> looks fine ? or do you expect "ls" to ignore case ?
I think the problem is that 'ls SaL*' returns 'SaL*' as the output. It
should return nothing. It also succeeds (RC0) when it shouldn't.
--
Tony Evans
Saving trees and wasting electrons since 1993
blog -> http://perceptionistruth.com/
books -> http://www.bookthing.co.uk
[ anything below this line wasn't written by me ]