'ls' hangs FC6

Joe Smith jes at martnet.com
Wed Apr 9 21:15:52 UTC 2008


Mark Haney wrote:
> And yes /bin/ls --color=tty hangs.  In fact, I changed it to color=auto 
> and THAT hangs as well.  I changed the ls alias to be just 'ls' and that 
> works fine for all directories that were hanging  before.  But now, ls 
> -l hangs too.  Man, this is weird.

Both colorizing the names based on the file type and getting the file 
metadata for a long listing require reading each file's inode, whereas 
'ls' showing only the name requires only reading the directory data.

I can't tell you why that should make a difference, except that the 
directory data may be in cache somewhere, and the inode data are not. If 
the disk has gone AWOL in the meantime, then ls will hang waiting to 
read the inode data.

In any case, it's not really so weird that you get different behavior 
when using the options: they do quite different things behind the curtain.

<Joe




More information about the users mailing list