Skip to content

Instantly share code, notes, and snippets.

@cy-park
Created November 27, 2020 12:15
Show Gist options
  • Save cy-park/561bf31797819b15f2df4076bc0e9e96 to your computer and use it in GitHub Desktop.
Save cy-park/561bf31797819b15f2df4076bc0e9e96 to your computer and use it in GitHub Desktop.

Get total number of files in current directory

Excluding sub-directories

$ ls -1 | wc -l

Including sub-directories

$ find . -type f -print | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment