Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Counts the number of files of a given directory
#!/bin/bash
# Add this one-liner script to the PATH variable and have the power to count the files in a directory from anywhere in the command line
ls -1 $1 | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment