

He wrote more than 7k+ posts and helped numerous readers to master IT topics. Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source.
#Linux find file recursive how to#
You learned how to search and delete a directory recursively when using Linux or Unix-like operating system. Open up the du command and read the recursive directory listing on Unix. For Linux, check a recursive directory listing by using the the find command: /dir/ -print. See “ How to push/send message to iOS and Android from Linux CLI” for more information. How To Find A File In Linux Recursively -R: Gets the directory list on Linux if you run ls -R. Use find to search for a file or directory on. Mail -A " $log" -s "Backup rotation successful $HOSTNAME " -r webmaster alert <<< "$0 script ran successfully." fi # Remove log file if found & /bin / rm -f " $log" find is a command for recursively filtering objects in the file system based on a simple conditional mechanism.

Push_to_mobile "$0" "Monthly backup rotation successful $HOSTNAME " Mail -A " $log" -s "Backup rotation failed $HOSTNAME " -r webmaster alert <<< "$0 script cached errors." else Push_to_mobile "$0" "Alert backup rotation failed - $HOSTNAME. $ find /dir/to/search/ -type d -name "dirName" -exec rm -rf " & failed= "true" # Send email and push status to sysadmin mobile # if then

Find command syntax to delete directory recursively
