Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 1
    This was likely downvoted because it's dangerous. Where the original question mentioned ./cache this answer assumes that ./cache is the current directory - which it would not be per the OP. Secondly, the addition of the -print would spew (tens of) thousands of lines of output. There is another subtle issue: if there are subdirectories in the current directory, it will attempt (and fail) to delete them - unless they are already empty... but that may also be undesired! Why: Because find does a depth-first search starting at each subdirectory. Commented Jul 25, 2020 at 17:41