Linux execution delay in long listing of files.

Compiler

Disciple
Hi ,

Whenever i try to execute ls with l as an option the system displays the output with significant delay.
However only ls works fine.

this happens only when i m in /usr/local/sbin where all my executable resides.

The workload on server is not more than 1.

What could be the reason .

Code:
# which ls
alias ls='ls --color=tty'
        /bin/ls

Distribution details.
Code:
# 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
Here is the difference .
Code:
#time ls
real    0m0.004s
user    0m0.000s
sys     0m0.002s
#time ls -ltr
real    3m2.443s
user    0m0.003s
sys     0m0.002s
 
Is the time delay same for ls -l and ls -ltr ? I have a feeling that if there are a large number of files in the directory, then the tr would cause additional delay
 
blr_p said:
Is this in a vm or on the box ?
It was a problem of ownership .When i tried executing ls -n. it resulted in faster response .
-n option make sure that only uid and gid are displayed.

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