Under a Linux system, I want to get a list of directory names six directories down from the root.
From what I can tell, I can't use wildcards using os.listdir like I can by merely using an 'ls' command under Linux, but if I know that the directories I want are 'x' number of directories down, but I do not know the names of the intermediate directories, I am not sure how to do this in Python.
IE: /my/dir/is/*/*/*/here
I know the first few directory names, but there are a few where the patterns will change before I get to the level of what directory names I want, aka, "here," from my example path.
Nor can I easily predict the name of the directories I am looking to list.
I'd provide my code, but it's inside a client-controlled lab space that is not connected to the world as we know it nor can I remove content from the space. Apologies.
I am new to Python, so I am not quite sure what the correct question is that I'm looking to ask is.
Thx -Bruce