Is there a way to delete a non-empty directory with subdirectories? I know I can send to trash in a GUI but would like to do it from the terminal interface.
I have a folder that is full of files and subdirectories. A lot of that is trash, but some of it I want to keep.
Therefore, I want to delete all files of a few certain types (which are the files I don't want or need) and then delete all empty directories and subdirectories.
These commands do not work at all - they do nothing:
find . -name "*.jpg" -type f -delete
My Mac Air runs both OS X 10.9.4 and Windows 7. There is a folder that won't delete in Windows, but I successfully put it in Trash in Mac. However, I can't delete it from Trash.
I have tried pressing Option while clicking Empty Trash, but it didn't work. I tried numerous Terminal commands, but it either said input/output error or that the directory is not empty.