Answers for "bash perform operation on all files in directory"

1

bash perform operation on all files in directory

# Basic syntax:
find . -maxdepth 1 -type f -exec your_command {} \;
# Where:
#	- . specifies the current directory (this can be changed to any
#		directory)
#	- -maxdepth 1 prevents find from searching directories recursively
#	- -type f specifies that the operation should only be performed on
#		files (not directories)
#	- -exec runs your_command on all files that are found
Posted by: Guest on July-22-2021

Code answers related to "bash perform operation on all files in directory"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language