How do I remove all files in a directory, but not sub-folders, or their contents in linux?
- by Yegor
I have a directly called /cache which has about a million files.
I restructured my caching system to put cache files into different folders, inside the /cache dir. new cache files are already being written to those sub-folders. So I want to remove all the files inside the /cache dir that are not in any subfolder.
How would I do this in SSH?