You can use Linux rm command with -v or –verbose option to print a message each time a file or directory is deleted.
1 2 3 4 5 6 7 8 |
## Create theree directories and print message for each deletion touch myfile{1..3} ## create some files rm -v myfile* ## remove the files with output ## removed ‘myfile1’ ## removed ‘myfile2’ ## removed ‘myfile3’ |