python_directory_search
import os config_files=[] webserver_config="/etc/httpd/conf.d/" for root, dirs, files in os.walk(webserver_config): for file in files: if file.endswith(".conf"): config_files.append(os.path.join(root, file)) for print_config in config_files: print print_config
python_directory_search.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1