[Bug 264313] Re: ls --color hangs for directories linked from network

Thorsten Frank thorstenfrank1978 at gmail.com
Fri Jun 13 11:19:33 UTC 2014


I can confirm this on Ubuntu 14.04, but as has been pointed out, I don't
really expect a "fix" to this. However, the workaround at first didn't
work for me until I'd figured out that you ALSO have to make sure that
you don't have an alias set for ls which uses the "-F"  option.

"-F" tries the same as the "or=..."-Option in dircolors - it categorizes
the files in a directory listing, and therefore tries to determine
whether or not a symlink is broken.

To determine whether the workaround works for you, try this:

eval `dircolors -b | sed s/or=[^:]*://`
\ls -l --colors=auto

The backslash in front of the ls-command circumvents any set aliases, so
you get the real behaviour of exactly the following command.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/264313

Title:
  ls --color hangs for directories linked from network

Status in “coreutils” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: coreutils

  ls --color hangs for directories linked from network resources if those resources are not available
  I guess it hangs in trying to validate the link ( have not tried to wait and see if it times out or not )

  easily reproducible.

  annoying since --color is default

  Running Ubuntu 8.0.4
  2.6.24-21-generic #1 SMP Mon Aug 25 16:57:51 UTC 2008 x86_64 GNU/Linux
  ls (GNU coreutils) 6.10

  ISSUE:

  since ls --color will try to determine if a symlink is broken or not
  (so that it will be correctly coloured), it *will* timeout on vanished
  resources.

  WORKAROUND:

  Inhibit 'ls' from following symlinks (at least in the context of --color):
  eval `dircolors -b | sed s/or=[^:]*://`

  Add the above to your profile.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/264313/+subscriptions



More information about the foundations-bugs mailing list