Useful Shell Commands
Published:
Count number of fiels in a dir
ls | wc -l
, all regular files/folders just in this dirls -a | grep ^\\. | wc -l
, all hidden files/folders just in thid dirtree -L 1
, list tree just in this dir, and count number of files and folders respectivelyfind ./ -maxdepth 1 -type f,d | wc -l
, but will match current dir and hidden files/folders