[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Unix 101: ls with file count



Okay, back to Unix 101 for me.

How do I produce a directory listing followed by a count of files and directories?

ls | wc

only produces a count without listing the files, and it doesn't distinguish between files and directories. What I'd like is something like this:

westk03[westk]:/home/westk> ls
DOCS          evolution
Desktop       lang
HOCHZEIT.MPG  lynx_bookmarks.html
INSTALLERS    mbox
MMEDIA        mnt
Mail          nsmail
Nautilus      oh brother where art thou - down by the river allison kra.wav
PILOT         plugin130_01.trace
bin           progtool
calc.perl     tmp
clock         vmware
doc           www

16 directories
8 files
--------
24 total

Thanks!

Kent



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: