A Generation Lost in the Bazaar - Poul-Henning Kamp article

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Aug 23 16:51:21 UTC 2012


On Wed, Aug 22, 2012 at 06:32:47PM -0400, phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:
> Sure, but why do I have to add the cryptic */ to this? Why not just ls -d?

Because the shell matches only directories with */ where as * matches
everything (other than . files).

ls has nothing to do with it.  It just does what it is told.

echo */

Nice and short.

ls's job is actually to count the files, run stat on them to get dates,
permissions, etc, and format it nicely.  The list itself is the shell's
job, unless you are doing a recursive ls or not specifying any files
and reyling on ls doing something useful based on the current working
directory.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list