How can I delete all 'nohup.out' files within a directory recursively from my terminal? I'm using CentOS.
Delete all 'nohup.out' within a directory recursively
command line;files;rm;recursive
There can't be multiple files named nohup.out in a single directory, so I assume you mean that you want to remove it recursively:find . -name nohup.out -exec rm {} +If you are using GNU find, you can use -delete:find . -name nohup.out -deleteIn bash4+, you can also use globstar:shopt -s globstar dotglobrm -- **/nohup.outNote, however, that globstar traverses symlinks when descending the directory tree, and may break if the length of the file list exceeds the limit on the size of arguments.