Simple question I'm sure. I've seen an answer that show how to do it including subdirectories, but I want to know how many files (not folders) are in the current directory only. Thanks.
Ubuntu – How to count number of files in a directory but not recursively
command line
Related Question
- Ubuntu – Grep through subdirectories
- Ubuntu – How to have `ll` command not display hidden files
- Ubuntu – How would you count every occurrence of a term in all files in the current directory
- Ubuntu – How to remove a directory without removing its content
- Ubuntu – How to count files with a particular extension, and the directories they are in
Best Answer
ls -F
list all files and append indicator (one of */=>@|) to entriesgrep -v /
keep all de strings that do not contain a slashwc -l
count lines