Inconsistent results from ls

David david@daku.org
Wed Jan 12 02:30:24 GMT 2022


Folks

I tried executing 'ls -l' on a file. I addressed the file in various 
ways, with my current directory (in Windows) set to c:\temp

ls -l test.txt
ls -l /cygdrive/c/temp/test.txt
ls -l
ls -l *
ls -l c:/temp/test.txt


In all cases, the owner, group, date and size are the same, as I 
would hope them to be.  However, the last result showed a mode 
setting displayed was different than the value shown in the 
others.  This doesn't seem right, and I'm not sure what the correct 
value should be.  Any ideas?

David

Pasted from my example, with the name of the owner changed to "myself":

c:\temp>ls -l test.txt
-rwxrwx---+ 1 myself None 14 Jan 11 18:23 test.txt

c:\temp>ls -l /cygdrive/c/temp/test.txt
-rwxrwx---+ 1 myself None 14 Jan 11 18:23 /cygdrive/c/temp/test.txt

c:\temp>ls -l
total 1
-rwxrwx---+ 1 myself None 14 Jan 11 18:23 test.txt

c:\temp>ls -l *
-rwxrwx---+ 1 myself None 14 Jan 11 18:23 test.txt

c:\temp>ls -l c:/temp/test.txt
-rw-r--r-- 1 myself None 14 Jan 11 18:23 c:/temp/test.txt

c:\temp>



More information about the Cygwin mailing list