====== How to count file number in a directory under Linux ? ====== One of the possibilities is to use this command line: ls -1 your/directory/ | grep -c "" (''your/directory/'' is to replace by the directory you want to count its files) {{tag>article computing shell grep ls linux}} ~~DISCUSSION~~