directory:loop_through_files_in_directory_recursively
This is an old revision of the document!
Directory - Loop Through Files in Directory Recursively
find is one of the best commands to find files that satisfy specific criteria.
find . -type f -print0
NOTE: This will display a list of all relative file paths.
- dot(.) specifies to find files in our present working directory.
- -type f to specify that we want to search for only files and not directories.
for i in $(find . -type f -print0) do # code to perform task on each file. done
directory/loop_through_files_in_directory_recursively.1654769861.txt.gz ยท Last modified: 2022/06/09 10:17 by peter