0

I'm using tree on a directory which has -- among other things -- some Audacity projects in it. Each Audacity project is some file X.aup, along side a directory X_data, which contains a few sub-directories, and dozens of *.au files.

What I'd like to do is have tree display the X_data folder, so I know it's there, but not descend into it.

I could omit the directory entirely with tree -I '*_data' --matchdirs, or I could omit what appears to be the only child directory of these *_datas: tree -I 'e??' --matchdirs (of course, that's likely to be too broad), but what I'd like to do is tree -I '*_data/*' (which doesn't work).

1 Answer 1

0

Is there any reason you have to use tree? find would probably be a better tool for this:

find audacity_projects -type f -name 'X.aup' -o -type d -name 'X_data'
1
  • I do want the structure of a tree output. Also, your solution would only return the pair of things for the audacity project "X". I'm looking for a normal tree output on a given directory, except that all children of any *_data directory are removed. Commented Feb 27, 2022 at 21:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.