Re:You can list a directory containing 8 million files But n...
by pyre on Monday August 15, 2011 @07:59PM
(#2889203)
> invoking ls with a full path is an easy way to
> disable shell aliases
Or doing this: > 'ls'
Re:You can list a directory containing 8 million files But n...
by machrider on Monday August 15, 2011 @08:03PM
(#2889213)
Or \ls.
Re:You can list a directory containing 8 million files But n...
by emmelaich on Monday August 15, 2011 @10:37PM
(#2889595)
And you don't want to bother sorting, so:
\ls -f
Re:You can list a directory containing 8 million files But n...
by pyre on Monday August 15, 2011 @11:36PM
(#2889749)
Or:
env ls
Notes:* IIRC 'env' is a built-in on csh/tcsh though, and doesn't behave like I would expect it to. You may want to read that manpage in that case.
* This is how the following works:
#!/usr/bin/env python
Often, when ls is being slow, you can speed things up drastically by disabling the things that require a stat (colors, -F, etc.) that are often added by distro's shell files (invoking ls with a full path is an easy way to disable shell aliases.) Also, sorting is on by default, which slows things for obvious reasons.
When all you need to do is kill the stat overhead for small dirs on slow file systems, "echo *" is beautifully simple.