I'm familiar with how I would tackle this with PHP, however I'd like to get some more practice with bash scripting.
The task is to delete all files in a folder, which itself contains subfolders (with files). The files would typically be .pdf (or some variant: PDF, Pdf, pDf, ect), however there may occasionally be other file types including extensions unknown to me at this time.
Here's what I have so far. It echoes the filename, but if I issue rm $i, the system returns file not found on each file.
for i in `ls -bRC1 /foo/temp_folders/* ` ; do echo $i ; rm $i ; done
How would I force the absolute path when issuing rm $i?