The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
1answer
32 views

Have tree hide gitignored files

Is there a way to make tree not show files that are ignored in .gitignore? Thanks!
2
votes
1answer
47 views

'cd' complexity on ext4

In order to store attachments, a /path/to/atts/ directory will have numerous child-directories (product IDs) created (from 1 to ~10,000 or maybe more in the future), and in each of this subdir, 1 to ~...
1
vote
1answer
53 views

System is no longer outputting UTF-8 characters

I just had an issue with my server where it responded incredibly slowly, so I forced it to reboot over SSH. When I connected back, I found out my system no longer outputs certain characters correctly. ...
0
votes
1answer
16 views

Tree/Find command on symlinks

I have a folder with symlinks which are pointing to other folders, how can i recursively look into those folders? I would like to do a grep on those results to search for matches. doing tree will ...
1
vote
1answer
30 views

tree command in a shell script doesn't append slashes for directories

I have a shell script executes tree command $ cat _tree.sh #!/bin/sh tree -L 2 --charset ascii -I "_tree.sh|LICENSE|README.md|node_modules|nbproject" $ sh _tree.sh . |-- bower.json |-- dpl |-- dst |...
0
votes
1answer
395 views

Process tree using fork() [closed]

I am given the task of creating this process tree in C using fork, if and else: |_____1___ |___2__ | |_4_ | |_3_ | | | | | Or as a pstree like drawing: p(0)─┬─p(1)───p(3) ├─p(2) ...
0
votes
2answers
38 views

How to exclude the files with all the 4-digit numbers without the first five numbers by wild card in tree command

I want to exclude list the following number 0005 0006 ... 9998 9999 I try the following code, but failed And I use tree -I '*.[0-9][0-9][0-9][5-9]' But It creates line with 0014 0024... I ...
0
votes
1answer
517 views

How do I install TREE when the command line doesn't work?

I tried to install TREE via the sudo apt-get install tree command but nothing but an error happens ("sudo: apt-get: command not found"). How do I fix this?
1
vote
2answers
35 views

Print indentations with whitespace only in tree command

I want to list the subdirectories of a directory using tree command. But I don't want to print indentation lines. I only want to have the whitespaces instead. I couldn't find the correct parameter ...
0
votes
1answer
37 views

Using `tree`, how do I output files before subdirectories?

I tried to combine --dirsfirst and -r, but directories still show up on top, only in reverse alphabetical order. It seems like -r is applied first, which is also indicated by the man pages. Any other ...
10
votes
3answers
1k views

combine the best of 'du' and 'tree'

I'm wondering if we can combine the honesty of 'du' with the indented formatting of 'tree'. If I want a listing of the sizes of directories: du -hx -d2 ...displays two levels deep and all the size ...
-1
votes
1answer
137 views

How to make tree output only files?

tree has a -d option to "List directories only.". However, I cannot seem to find an option to "List files only." I have looked through the man page, but I cannot seem to find an option for listing ...
3
votes
1answer
80 views

Passing list of ignored directories to `tree` command [duplicate]

I'm writing a script in which I need to generate a tree of directories. How to pass to tree a variable with list of directories to ignore? And those directories are with spaces in name. I tried ...
2
votes
0answers
162 views

Display btrfs subvolume tree

Is there a way to make a btrfs subvolume tree like what is shown below? (Only subvolumes - no regular directories or files.) # tree /mnt/1 /mnt/1 ├── a ├── snapshot │ ├── a │ └── subv └── subv ...
2
votes
1answer
426 views

Automatically colorize the output of tree

In plain zsh, tree is set similar to --color=auto by default. However, when I use Oh-My-Zsh, tree doesn't show colors. Since tree does not have a --color=auto option, how can I override the setting ...
1
vote
0answers
154 views

Create tree of processes

I'm implementing pstree as an assignment, and I would like to create test tree of processes, but I'm struggling to do so. I tried to do something like this to create tree of background processes ...
2
votes
1answer
64 views

Tree with directory name and filenames

I run with tree 1.7.0 tree -PF dat It gives . ├── 0deg/ ├── 105deg/ ├── 120deg/ ├── 135deg/ ├── 150deg/ ├── 15deg/ ├── 165deg/ ├── 180deg/ ├── 210deg/ ├── 240deg/ ├── 270deg/ ├── 300deg/ ├── ...
2
votes
1answer
97 views

Tool to add hierarchical structure to output, similar to tree

Is there a tool that is similar to tree which could be used in conjunction with echo? I want to easily prepend hierarchical structure to output. I know I could write it, but if a solution ("do one ...
2
votes
2answers
138 views

How do I display a dependency chain from one package to another?

For example, I want to find out why monodevelop does depend on systemd. apt-rdepends -r systemd shows all packages that that directly or indirectly depend on systemd: $ apt-rdepends --dotty -r ...
3
votes
2answers
730 views

The reverse of `tree` - reconstruct file and directory structure from text file contents?

We all know we can use tree to get a nicely formatted text "visualization" of the structure of a directory; say: $ tree -spugD /usr/include/boost/accumulators/numeric/ /usr/include/boost/accumulators/...
3
votes
2answers
961 views

utf-8 sequence in the console

when I perform the "tree" command in the console, here's what I've got : . ├── Annexe\ 1\ -\ Sch\303\251ma\ global\ de\ la\ base\ de\ donn\303\251es.raw ... The result is composed of utf-8 ...
20
votes
2answers
8k views

“tree” command output with “pure” (7-bit) ASCII output

The "tree" command uses nice box-drawing characters to show the tree but I want to use the output in a "code-page-neutral" context (I know that really there's always a code page, but by restricting it ...
1
vote
3answers
202 views

How to create a kernel source tree?

I am reading a book on creating drivers on Linux, I do not have too much experience with Linux, I have installed a quite a few distros before but I have always used windows as my main operating system....
2
votes
1answer
164 views

Filesystem content inspection GUI (like gconf-/dconf-editor)?

Within, for instance, /sys/kernel/debug/tracing, the kernel makes many settings available as files, whose contents should be read in order to see what that setting is. Of course, typing cat /sys/...
3
votes
2answers
438 views

Edit tree to output in custom format?

I'd like to get a custom output from the tree command, but unlike this question, I don't have a fixed format. I'd like to be able to give the command the format in an argument (for instance perhaps -f=...
1
vote
1answer
395 views

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 ...
2
votes
3answers
86 views

Can tree be used to list the number of files per level?

As title, I need to look into a particular directory and list the number of files per level. The directory is pretty large, about 10-15 levels deep. For instance, if I have the following: D1 | |-- ...
3
votes
1answer
93 views

Print out file structure on Unix

Is there a way on unix to print out the file structure, like Bootstrap's getting started page? bootstrap/ ├── css/ │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── bootstrap-theme.css │ ├── ...
9
votes
2answers
646 views

How can I pipe colored tree result to less or more?

I get colored tree using tree -C but when I pipe it to less I get results like this: tree public/ -C | less How can I have colors in less in this case?
4
votes
4answers
4k views

Convert output of tree command to json format

Is there a convenient way to convert the output of the *nix command "tree" to JSON format? Edit: I think I didn't describe my problem well enough. My goal is to convert something like: . |-- dir1 | ...
1
vote
1answer
120 views

gnuclad does not change starting date

I'm using gnuclad to create a tree. The problem is that I'm not able to change the starting date. I'm using the data below, from the default example. #,Nodes,,,,,,,,,,,,, #,Name,Color,Parent,Start,...
6
votes
2answers
22k views

cat files in current folder and all subfolders [duplicate]

I want to cat a file in current folder and all files in all subfolders (and subsubfolders). Here is my directory structure $ tree . ├── f │   └── foo └── yo I want to cat foo and yo. I've tried ...
7
votes
3answers
8k views

tree command for multiple includes and excludes

Could you please give me an example of using the tree command to filter out result as follows: to ignore directories (say bin, unitTest) only listing certain files having extensions (say .cpp, .c, ....
3
votes
2answers
3k views

Can the UNIX command tree display only directories matching a pattern?

I'm trying to figure out if there is a way to get the UNIX command tree to display only directories that match a specific pattern. % tree -d tstdir -P '*qm*' -L 1 tstdir |-- d1 |-- d2 |-- qm1 |-- ...
0
votes
2answers
1k views

Can the UNIX command tree display only directories matching a pattern?

I'm trying to figure out if there is a way to get the UNIX command tree to display only directories that match a specific pattern. % tree -d tstdir -P '*qm*' -L 1 tstdir |-- d1 |-- d2 |-- qm1 |-- ...
4
votes
2answers
3k views

Shellscript to print a directory tree and files's contents with a nice presentation

I'm trying to write a shellscript which prints a tree-view for a specific directory and it's subdirs to pdf via latex, as well as the titles and contents of all scripts contained within that primary ...
29
votes
1answer
9k views

How do we specify multiple ignore patterns for `tree` command?

I need to print the directory structure of our production system and I would like to remove some specific directories from the tree? How do we specify multiple ignore patterns for tree command?
16
votes
1answer
10k views

Print size of directory content with tree command in tree 1.5?

I like tree it's a nice way to display my files and the size of folders/directories. But the -h option only shows the size of the directory, not it's contents. /media/ ├── [ 16K] 64D9-E862 │   ├── [...
7
votes
1answer
594 views

Interactive tree command

Is there any version of tree command that displays file structure as a tree structure, but in a way that I can interactively walk trough? Why do I need it exactly - I am trying to simulate TextMate ...
5
votes
4answers
8k views

Is there a way to disable wget from getting files from parent directories to given depth?

wget has such option as -np which disables getting files from any parent directory. I need something similar but a bit more flexible. Consider: www.foo.com/bar1/bar2/bar3/index.html I would like to ...