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*

2
  • Hi Niel. Your idea may be useful to check the existence of directories depending on a pattern like: find -maxdepth 1 -type d -name 'pattern'. Do you mind if I append in your answer this trick? Cheers ;) Commented Nov 18, 2013 at 13:54
  • love this. all the rest of these -d suggestions require that you can access that directory, but if we just need to check for existence, this find approach is great. Commented Jun 17, 2024 at 1:38