bash for all files in directory code example
Example 1: bash loop over files in directory
#!/bin/bash
for filename in /Data/*.txt; do
...
done
Example 2: bash how many files in a directory
ls -1q log* | wc -l
Example 3: bash list all files in directory and subdirectories
# Bash-specific
# syntax
ls -R <file-or-directory-to-find>
# example
ls -R *hotographi*