:: How to count file(s) in directory?? ::

here is the code :

‘ll -1A | wc -l’ –> without quote

but, you have to improve the command, and you must substract result by one.

another sample :  ‘ll -1A *.xls | wc -l’

This entry was posted in Linux. Bookmark the permalink.

2 Responses to :: How to count file(s) in directory?? ::

  1. x.1024mb says:

    hmmmm… thanks for sharing

  2. dheche says:

    pake find lebih enak:
    - gak rekursif
    find . -maxdepth 1 -type f | wc -l
    - kalo mo rekursif tinggal diilangin opsi maxdeptnya
    - ngitung direktori instead of file, tinggal diganti -type nya jadi d :D

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>