Not able to run ls -ltr

Hi ,

Whenever i try to execute ls with l as an option the system hangs.

The workload on server is not more than 1.
What could be the reason .

Normal ls works fine but ls -l causes the system to hang.

This is happening when i m in /usr/local/sbin directory.

I can see that the output is getting generated after 3-4 minutes.

See the comparison.

#time ls
real    0m0.004s
user    0m0.000s
sys     0m0.002s
#time ls -ltr
real    3m2.443s
user    0m0.003s
sys     0m0.002s
# which ls
alias ls='ls --color=tty'
        /bin/ls

Distribution details

# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release:        5.2
Codename:       Carthage

Are there NFS mounts in /usr/local/sbin and have they become stale?

No such NFS are mounted in /usr/local/sbin

The difference between ls and ls -l is that the latter command reads inodes and performs user name and group name lookups. If your directory service (for example ldap) functions poorly there may be delays. How fast is ls -n ?

ls -n is faster than ls -l
but we dont have ldap configured.

---------- Post updated at 10:53 PM ---------- Previous update was at 05:21 AM ----------

It was a problem of ownership .When i tried executing ls -n it resulted in faster responce .
-n option make sure that only uid and gid are displayed.

So i figured out that one of the folder has wrong ownership.
I changed the ownership of the folder and the problem is solved.