Results 1 to 4 of 4
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 ...
- 07-11-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 17
execution delay for listing files.
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 .
Distribution details.Code:# which ls alias ls='ls --color=tty' /bin/ls
Here is the difference .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
Code:#time ls real 0m0.004s user 0m0.000s sys 0m0.002s #time ls -ltr real 3m2.443s user 0m0.003s sys 0m0.002s
- 07-11-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,971
As you surmise, the aliased "ls" command may be at fault. Try running the command "/bin/ls -ltr" and see how that works.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 07-11-2011 #3
Well the t flag sorts by modification time and then the r flag reverses the order, so maybe if there are a lot of files in that directory the sort is taking time, try running the following to identify which flag is slowing it down
Code:time ls time ls -l time ls -t time ls -r
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 07-12-2011 #4Just Joined!
- Join Date
- Mar 2011
- Posts
- 17
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.


Reply With Quote
