Answers for "bash loop over files in directory and subdirectories"

17

iterate through all files in directory python

import os
directory = 'the/directory/you/want/to/use'

for filename in os.listdir(directory):
    if filename.endswith(".txt"):
      #do smth
      continue
    else:
    continue
Posted by: Guest on March-30-2020
0

bash count files in directory recursively matchingattern

find . -type f -name '*.log' -printf x | wc -c
Posted by: Guest on November-27-2019

Code answers related to "bash loop over files in directory and subdirectories"

Python Answers by Framework

Browse Popular Code Answers by Language