Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CIFS AIX problem using ls and wildcards

97 views
Skip to first unread message

jeangui.

unread,
Feb 9, 2010, 11:19:00 AM2/9/10
to
Hi,

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------------------------

++

Henry

unread,
Feb 9, 2010, 7:23:06 PM2/9/10
to

looks fine ? or do you expect "ls" to ignore case ?

Heinrich Mislik

unread,
Feb 10, 2010, 6:04:52 AM2/10/10
to
In article <79b5b99b-57bc-4f61...@f15g2000yqe.googlegroups.com>, j...@gmx.fr says...

>
>
>Hi,
>
>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?

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

jeangui.

unread,
Feb 10, 2010, 6:15:05 AM2/10/10
to
On Feb 10, 12:04 pm, Heinrich.Mis...@univie.ac.at (Heinrich Mislik)
wrote:
> In article <79b5b99b-57bc-4f61-99e9-7adf07b3b...@f15g2000yqe.googlegroups.com>, j...@gmx.fr says...
>
> [snip]

> --
> 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.

Tony

unread,
Feb 10, 2010, 7:29:10 AM2/10/10
to
On 10/02/2010 00:23, Henry wrote:
> On Feb 10, 5:19 am, "jeangui."<j...@gmx.fr> wrote:
>> Hi,
>>
>> 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:/cifs/>ls SaL*
>> SaL*
>>
>> myuser@mymachine:/cifs/>echo $?
>> 0

> 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 ]

0 new messages