I want to see what files will be deleted when performing an rm in linux.  Most commands seem to have a dry run option to show just such information, but I can't seem to find such an option for rm.  Is this even possible?
How do you run a dry run of rm to see what files will be deleted?
file management;rm
Say you want to run:rm *.txtYou can just run:echo rm *.txtor even just:echo *.txtto see what files rm would delete, because it's the shell expanding the *.txt, not rm.The only time this won't help you is for rm -r.If you want to remove files and directories recursively, then you could use find instead of rm -r, e.g.find . -name *.txt -printthen if it does what you want, change the -print to -delete:find . -name *.txt -delete