576 reputation
416
bio website
location Austria
age
visits member for 2 years, 11 months
seen Apr 9 at 9:08

Jun
10
awarded  Teacher
Jun
10
answered script to use the output of a command (ls) and use it in another command
Jun
2
comment What is a better way to deal with server disconnects of sshfs mounts?
any solution using maintained software?
Jun
1
asked What is a better way to deal with server disconnects of sshfs mounts?
May
6
awarded  Supporter
May
5
awarded  Nice Question
May
5
awarded  Scholar
May
5
accepted Why does “ls *” take so much longer than “ls”?
May
5
comment Why does “ls *” take so much longer than “ls”?
On the other hand, ls uses getdents64 and not (l)stat64 (as ls * is doing). getdents64 doesn't have a file name argument. On GPFL, ls -l uses another function called readlink, which may be faster than stat64. thanks a lot!
May
5
comment Why does “ls *” take so much longer than “ls”?
nice! You're right, I'm not seeing this difference on a local file system. Anyway, strace reveals that ls -l * is using lstat64 and getxattr, whereas ls * is just using stat64 and lstat64.
May
5
revised What are your favorite command line features or tricks?
added scr() function
May
5
revised What are your favorite command line features or tricks?
fixed '}' outside loop, which would result in copy and paste errors. Then some improvments to capitalization, such that I reach the 6 char changes limit
May
5
comment Why does “ls *” take so much longer than “ls”?
@camh: I tested a bit more (see my edits) and found that: ls < ls -l < ls -l * < ls * (I always ran it three times). With your explanation, I don't understand why ls -l * is faster than ls *
May
5
revised Why does “ls *” take so much longer than “ls”?
+ ls -l *
May
5
revised Why does “ls *” take so much longer than “ls”?
added 106 characters in body
May
5
suggested suggested edit on What are your favorite command line features or tricks?
May
5
suggested suggested edit on What are your favorite command line features or tricks?
May
5
comment Why does “ls *” take so much longer than “ls”?
@N J one query vs many is a good summary so far. @camh: thanks for the detailed answer. I posted the output of ls -l as well (still about 30 seconds less than ls *)
May
5
awarded  Editor
May
5
revised Why does “ls *” take so much longer than “ls”?
added ls -l