I have a directory full of several other directories with the same structure, so it looks like this
top/A/Output/platform/..
top/B/Output/platform/..
top/C/Output/platform/..
and so on. I want to, starting from the top level, delete all the directories downwards of the platform directories, such that I end up with
top/A/Output
top/B/Output
top/C/Output
Can anyone recommend me a command for this? I am on rhel7 with bash 4.1.2
EDIT:
I have a lot of '2nd level' directories whose names are more complex than single letters, sorry should have noted that more explicitly
rm -rf top/[ABC]/Output/platformmaybe?