bash - Finding multiple files recursively and renaming in linux -
i having files a_dbg.txt, b_dbg.txt ... in suse 10 system. want write bash shell script should rename these files removing "_dbg" them. google suggested me use rename command. executed command rename _dbg.txt .txt *dbg* on current_folder my actual current_folder contains below files. current_folder/a_dbg.txt current_folder/b_dbg.txt current_folder/xx/c_dbg.txt current_folder/yy/d_dbg.txt after executing rename command, current_folder/a.txt current_folder/b.txt current_folder/xx/c_dbg.txt current_folder/yy/d_dbg.txt its not doing recursively, how make command rename files in subdirectories. xx , yy having many subdirectories name unpredictable. , current_folder having other files also. you can use find find matching files recursively: $ find . -iname "*dbg*" -exec rename _dbg.txt .txt '{}' \; edit: '{}' , \; are? the -exec argument makes find execute rename every matching file found. '{}' replac...