On my linux machine I have a directory tree like this:
rootDir
|--123456789
| |-- test
| |-- live
|
|--234456789
| |-- live
|
|--454354334
|-- test
And I would need to find all top level directories that have both directories (“test”, and “live”) and then delete the “test” one. I would like to accomplish this with a single line command, if possible.
echois optional.vioptions added tormto make it verbose & interactiveWhen you said delete test one I am assuming only the test directory.
But if you want to delete the parent directory that contains both then try
Hope this helps!