Questions tagged [tree]

the command line tool for displaying a directory structure in a tree form

Filter by
Sorted by
Tagged with
2
votes
1answer
50 views

Print size of directory content with tree command, but exclude files from report

I often use du --max-depth=n -h | sort --human-numeric-sort Now I want to use tree, in a similar manner. I found here a partial answer tree -sh --sort=size --du where --du makes tree reporting the ...
2
votes
0answers
64 views

Explain difference in non-hidden file count when using Nautilus vs. using other tools such as tree and how to independently calculate former count?

I recently have been backing up my files from a laptop and as part of that have opted to move a folder that at first seemed to be of size 107.6 GB from one hard drive to another. As I was copying, I ...
0
votes
1answer
29 views

Recursively count all files ignoring certain directory paths

I want to recursively count all files contained in root ignoring all files contained in the following directory paths: root/*/build root/*/*/*/build how can I accomplish this?
2
votes
2answers
1k views

Tree Command not working in some directories

I was learning about virtual environments and projects. While watching videos I encountered 'tree command I installed tree and then run it. But it is not working on other partition of my HDD other ...
0
votes
0answers
48 views

What should I do with a program directory for its installation?

I downloaded a tar of Ovito, now I don't how to continue. The principal idea is to place this in /opt, but is this a good idea? The directory structure is like the following ovito-2.9.0-x86_64 ├── ...
0
votes
2answers
1k views

Install latest version of tree command

I installed the tree command today on Ubuntu 18.04 using: $ sudo apt update $ sudo apt install tree The version that was installed is: $ tree --version tree v1.7.0 (c) 1996 - 2014 But I see from ...
0
votes
1answer
361 views

Problem with the tree command [closed]

Previously I had installed the tree command with apt and it worked just fine, but then I formatted my PC and used snap because i thought is was the same thing. Now the command outputs weird strings ...
2
votes
1answer
7k views

apt --fix-broken install [duplicate]

I am new to this. Just got this message below and I cant figure out how to fix it Reading package lists... Done Building dependency tree Reading state information... Done You might want to run ...
2
votes
1answer
668 views

Show tree of directory with files content

I would like to print out in terminal tree like one below: $ tree -a . └── .git ├── branches ├── config ├── description ├── HEAD ├── hooks │   ├── applypatch-msg.sample │  ...
1
vote
1answer
107 views

How to update Tree to 1.7

I've installed tree using the command line sudo apt-get install tree but it installed version 1.6 and I need 1.7 Any suggestion how to achieve that appreciate your kind help.
0
votes
1answer
672 views

Possible to collapse the output of tree -h?

I am trying to add a javascript to tree -h output an HTML file that can collapse all the child elements and would only display the parent elements. I find it difficult to do it with JavaScript because ...
1
vote
0answers
82 views

Output disc space of folders as JSON

I want to output the size of folders to a json file with the following command tree -d -JL 3 --charset utf-8 --du $HOME/share >> discspace.json But the command won't output valid json. Instead ...
2
votes
1answer
97 views

Cron turns off the colorization of tree

I made a bash script which can tree a whole directory structure recursively, putting into every directory a HTML file generated by the aha. The script read the list of directories to be indexed. find ...
1
vote
1answer
80 views

Not listing .gitkeep file in tree listing command and also unrecognized charset

For some reason when I execute this script i created the file .gitkeep does not show in the tree output and also my declaration of UTF8 for charset is incorrect. Here is my current script code: #!/...
2
votes
0answers
44 views

How to list contents of compressed files in a hierarchy mode?

Consider we have a file named XX.zip Use command zipinfo -1 XX.zip which shows the below content: XX/ XX/X-Data.txt XX/YY/ XX/YY/Zero.txt I wanna below output instead, assume we have extracted the ...
32
votes
2answers
13k views

How do I make *tree* list hidden files as well?

I'm using this package called tree to list sub directories and files in a given directory. It works fine except it doesn't list hidden files. When I run tree in a folder it returns ├── Zodiac (2007) ...
-1
votes
1answer
118 views

Which Command is faster among ls -R and tree? [closed]

I want to list all the files in all the directories and save them to a text file to keep a record for various reasons. WHAT I HAVE The D Drive and E Drive both consist of over 500 GB of data and ...
6
votes
2answers
7k views

Save result data command tree [closed]

I need to save all of the results of the command tree in a txt file. The objective is to save this data in a data base for later work in php and html. The main objective is to expose the structure on ...
2
votes
2answers
395 views

Show n files in each directory with tree command

I have the following directory structure: bocoup_data/ ├── text_reuse │   └── v2 │   └── json │   ├── alignments │   └── texts └── topic_modelling └── v2 └── json I'd ...
18
votes
1answer
6k views

How to print the output of tree to pdf without losing the color?

I use the following command to print a directory structure to a file: tree -h somepath/ > tree_of_somepath.txt tree gives a nice colorized output on the terminal, but as expected this cannot be ...
8
votes
2answers
22k views

Is there any command line to show tree view directory? [duplicate]

Many tutorials depict tree-view directory to show how they organize their files. Is there any command line to show such view? Is ls capable to do this?
1
vote
3answers
3k views

How do I use tree to show the path to filenames containing a particular string?

I have got a rather large file system, and let's say that I want to find all the files and directories in a certain area of my file system which contain the String ActionListeener, and to do this I ...
25
votes
1answer
84k views

How to install “tree” with command-line?

How do I install "tree" via apt-get in Terminal? I have been trying to do apt-get update tree but nothing seems to happen. Is it necessary to include sudo in the command?
0
votes
1answer
143 views

use tree to make sitemap

Time For my daily Ubuntu lulz. i went to make a site map using "$tree public_html/ > tree.txt" ok, looks good in gedit. put that in my site.. and all the pipes and dashes are garbage. .. have a look ...
-5
votes
0answers
60 views

Nautilus tree view [duplicate]

Where is the Nautilus tree view? List view is just not the same as tree view, so please help me to find the tree view option in Nautilus.
1
vote
2answers
610 views

terminal line height for nice “tree” ascii art display

Applications like tree uses some special characters to display ascii art. Unfortunately, gnome-terminal has a line height higher than the characters, giving spaces between the lines. See the ...