How do I list (ls) the content of a folder/directory recursively but to a depth of only one folder/directory?
I have the following folder structure:
folderA: folderB1: folderC1: fileD1: fileD2: fileC2 fileC3 folderB2: folderC4: fileD3: fileD4: fileC5 fileC6
I am in the parent folder of
folderA and would like to list everything in it and its subfolders but not subsubfolders. So I would like to see:
folderB1/folderC1 folderB1/fileC2 folderB1/fileC3 folderB2/folderC2 folderB2/fileC4 folderB2/fileC5
Is that possible? At the moment, I use
ls -R folderA which takes me down a rabbit hole of hundreds of subsub..subfolders I am not interested in. I would like to stop at a certain depth. Ideally, there would be an option like
depth 1 to list the content of folderA and its subfolders and stop.
I am working on macOS X High Sierra.