Questions tagged [tree]
57 questions
493
votes
14 answers
Mac OS X equivalent of the Ubuntu "tree" command
Is there an equivalent to the Ubuntu tree command for Mac OS X?
Misha Moroshko
- 8,023
85
votes
2 answers
Tree command list one level all files
How can I use the tree command to list current directory as a tree?
If I do
tree -L 1
It only lists the directories, how can I get it to show the files as well?
Nix
- 961
71
votes
4 answers
Windows 10 Powershell tree command, how to show files
How do I list folders and files using the PowerShell tree command? Is it possible to color format the output for distinct files and folders?
Tuomas Toivonen
- 993
- 2
- 8
- 10
29
votes
3 answers
Create symlinks recursively for a whole tree
I am seeking for a command that would re-create a whole tree of files in a different directory. I would prefer to have all symlinks absolute. Can I do that with a find and xargs? ;-)
lzap
- 1,021
21
votes
6 answers
linux tree command limit number of files displayed in each directory
I want to use tree (or similar) to see the directory structure of a given directory as well as whether each subdirectory has files in it. So, how could I use tree but limit the maximum number of files to display in a given subdirectory?
If it can't…
synaptik
- 435
- 2
- 6
- 16
18
votes
1 answer
Ignore multiple folders using tree
The command tree -I 'node_modules' prevents the node_modules folder from appearing in the output. Likewise, tree -I 'app/ui/bower_components' prevents app/ui/bower_components from appearing in the output.
However, tree -I 'node_modules' -I…
Jon
- 435
16
votes
2 answers
List contents of tarball in tree format
Per the answers here I'm able to list the contents of my tarball in ls format. However, I'd like to be able to list them in tree format, i.e. something like the latter instead of the former:
With tar:
$ tar -tf foo.tar…
Vasu
- 273
12
votes
1 answer
Ubuntu's ls can show unicode characters, but tree cannot, even with tree --charset unicode
Ubuntu 10.04's ls can show unicode characters, but tree cannot, even with tree --charset unicode or utf8. Is there a way to solve it. echo could interpret the escape characters except cat list.txt | echo -e won't work (list.txt comes from tree >…
nonopolarity
- 9,886
11
votes
4 answers
On Windows 7, dir or tree can't show unicode characters, even starting cmd with cmd /U
On Windows 7, dir or tree can't show unicode characters, even starting cmd with cmd /U
So I would press Window Key + R to run something, and type in cmd /U so that the content might handle Unicode.
And then using dir or tree /F, the content in…
nonopolarity
- 9,886
7
votes
1 answer
How to exclude multiple file extensions in tree?
When using the tree command, I'd like to exclude listing *.png and *.svg from the output. The problem is that every bracket expansion I try doesn't work. Is it because of how tree processes commandline arguments?
tree -I *.{svg,png}
tree -I…
6
votes
2 answers
linux: is tree -i -f -L $depth supposed to be faster than find -maxdepth $depth?
I am querying specific directories to see if I find files with a specific pattern in them and I have been trying it with two different commands:
Standard find command:
find -L $unix_dir\*/ -maxdepth $maxdepth -name \"$filepattern\"
and a tree and…
719016
- 4,683
6
votes
1 answer
Why don't ANSI symbols work in PuTTY/Debian?
The awesome application tree, which I installed in Debian with apt-get install tree, has the option of drawing its output using ANSI graphics. Its output looks like this now:
.
tqq node_modules
x tqq coffee-script
x tqq eco
x tqq express
x …
Hubro
- 6,016
5
votes
4 answers
How can I store Windows "tree" command output in a file and retrieve it again?
When I do a tree > somefile.txt the file indeed contains the output of the tree command, but the lines drawn in the console are displayed as accented letters ÃÄÄÄ.
Which encoding or mode do I have to use to display such an output file correctly and…
Andrew J. Brehm
- 5,342
5
votes
2 answers
Diagramming tool to edit a binary tree
I would like to create a diagram of a binary decision tree. What free tool will make that easy?
Hannes de Jager
- 427
4
votes
1 answer
Cannot view all the output from Windows command
I entered the following in cmd:
cd C:/Windows/System32
Then I ran the tree command.
For some reason, when I scroll up I cannot view the complete command :(
I counted and it only shows the last 298 lines.
Does cmd have some kind of limit or…
undo
- 6,129