Skip to main content
added 16 characters in body
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

I've read through the man pages for tree but I don't know if it is possible to have tree list only the filenames for all files that appear in any recursive search of a directory.

The closest I have gotten is: tree -i --noreport dir/ which might give me something like:

./lib

order

crossCount.js

rank

acyclic.js

./lib
order
crossCount.js
rank
acyclic.js

Where orderorder, liblib, and rankrank are directories that I do not want listed.

I've read through the man pages for tree but I don't know if it is possible to have tree list only the filenames for all files that appear in any recursive search of a directory.

The closest I have gotten is: tree -i --noreport dir/ which might give me something like:

./lib

order

crossCount.js

rank

acyclic.js

Where order, lib, and rank are directories that I do not want listed.

I've read through the man pages for tree but I don't know if it is possible to have tree list only the filenames for all files that appear in any recursive search of a directory.

The closest I have gotten is: tree -i --noreport dir/ which might give me something like:

./lib
order
crossCount.js
rank
acyclic.js

Where order, lib, and rank are directories that I do not want listed.

Source Link
quiet
  • 133
  • 1
  • 4

Getting tree command to not display directories

I've read through the man pages for tree but I don't know if it is possible to have tree list only the filenames for all files that appear in any recursive search of a directory.

The closest I have gotten is: tree -i --noreport dir/ which might give me something like:

./lib

order

crossCount.js

rank

acyclic.js

Where order, lib, and rank are directories that I do not want listed.