-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Rafal Maszkowski on 10/8/2008 3:16 PM:
> It happens to me that I need to count files in directories. du is a
> command which woud fit best to such task if it had an option "count
> number of files instead of number of bytes". It could be -i as in df -i.

Better than adding an extension that won't be widely available, how about
using an existing command?  For example:

find . | wc -l

is a close approximation and available on any POSIX system (it mishandles
files with embedded newlines in the name).  If you use GNU findutils, you
can use the more accurate:

find -printf - | wc -c

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjtalkACgkQ84KuGfSFAYA+YgCgjfFDKsqWKJIHaoBZPL0xhIz1
DVMAoL6oKOAXCSSYebisbCd0z2/5zI4J
=fUeu
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to