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

Written by

in

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’

Comments

2 responses to “:: How to count file(s) in directory?? ::”

  1. x.1024mb Avatar

    hmmmm… thanks for sharing

  2. dheche Avatar

    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
    😀