is there any way to use ls and rm together? maybe a pipeline?
i'm working on a vfat mounted drive and i want to remove all JPEG images and some OSX file from every directory..
Code:
./base
.DS_Store
file.mp3
./dir1
._.DS_Store
file.jpg
file.mp3
./dir2
.DS_Store
.FBCIndex
/.FBCLockFolder
.FBCSemaphoreFile
._.DS_Store
file.mp3
and i want to end up with:
Code:
./base
file.mp3
./dir1
file.mp3
./dir2
file.mp3
if anyone knows how to use "rm -rf" with "ls -R" or knows of a shell script that will do this for me, please let me know.