Skip to main content

Questions tagged [tree]

Filter by
Sorted by
Tagged with
9 votes
5 answers
2k views

I created a 'cron' subdirectory in /var/log/ . It is: /var/log/cron Within /var/log/cron I've created numerous sub-directories to store my log files for cron jobs. I am wondering if there is a way ...
Ron Piggott's user avatar
5 votes
2 answers
404 views

I can't solve what I want using the tree, du, or df commands. I'm using: du version 9.6 tree version 2.2.1 What I want: For the current directory, list all directories recursively to a depth of 3, ...
user2718593's user avatar
2 votes
0 answers
177 views

I know about the .info file functionality with the tree command and would like to use this in one of my bash scripts. I played around in the terminal and have the following structure: test ...
roediGERhard's user avatar
-2 votes
1 answer
86 views

I have a command to list the tree of a specific process number. So I did this: ps f -u "${USER}" --pid 1234 -eo command,pid,ppid,tty | awk 'NR <= 1 {print; next} !/awk/ && $0 ~ ...
user avatar
0 votes
1 answer
128 views

I just installed tree via sudo apt-get install tree and my terminal suddenly decided to update grub. Last week, I installed tree, and a similar thing happened. However, when I restarted my PC later ...
Yimeca's user avatar
  • 3
4 votes
1 answer
323 views

I'm trying to sort by size: % tree -axCF --du --sort=size | grep -e '/$' ├── [ 8658884] 2022-10-09-backup/ ├── [ 5923934] f24-01-22-backup/ ├── [ 5384825] e2023-01-19-backup/ ├── [ ...
Ray Andrews's user avatar
  • 2,615
4 votes
1 answer
554 views

By default, tree shows this: $ tree . ├── Package.resolved ├── Package.swift ├── Sources │   └── SwiftClientSDK │   ├── OpenAPI.yaml │   ├── SwiftClientSDK.swift │   └── openapi-generator-...
Rick's user avatar
  • 205
1 vote
1 answer
28 views

I would like tree to display the hw files in the sub-directories like this: . ├── exp │   └── hw ├── src │   └── hw.cpp2 └── tmp └── hw.cpp $ /usr/bin/tree --noreport . displays all of the files:...
CW Holeman II's user avatar
0 votes
1 answer
160 views

I gave the command tree -J to my machine, and this is a portion of the output it gave: { "type": "file", "name": &...
Alessandro's user avatar
0 votes
2 answers
2k views

Is it possible to use tree to create several output files without being cd ~/ into the directory I want to create a tree file? For example, I have a directory called parent-dir. Inside of parent-dir ...
linuxuser24569's user avatar
1 vote
1 answer
1k views

I want to keep only the last line of tree's output or the file+directory count report. Preferably, with the -a switch. An example output I desire: 585 directories, 37722 files Is this possible with ...
Sepp A's user avatar
  • 73
2 votes
0 answers
53 views

Say I have a directory structure that looks like this: foo |-- bar | |-- 1 | |-- 2 | |-- 3 | |-- baz | | |-- 4 | | |-- 5 | | |-- 6 | | |-- moo | | | |-- 7 | | | |-- ...
Lou's user avatar
  • 245
3 votes
1 answer
187 views

I've tried something like this tree -C | fzf --ansi | awk -F'|' '{print $NF}' ├── repo.git/ │   ├── folder/ │   │   ├── subfolder/ │   │   │   ├── output.0 │   │   │   └── traces.1 │   │   ├── ...
testoflow's user avatar
  • 147
0 votes
1 answer
72 views

Ubuntu. Tree. tree -fi /path/to/the/directory >~/file.txt I see the files in terminal but was under the impression that a text file called 'file.txt' would be generated, but I can't find it.
DipSew's user avatar
  • 1
4 votes
1 answer
4k views

I already used pass program for password managing on MacOS with zsh (where the autocompletion worked flawlessly out of the box) and now trying to move on linux on a raspberry pi 4b 4GB, installed zsh ...
ecjb's user avatar
  • 495
4 votes
2 answers
1k views

I'm creating a script that generates a project folder into another folder along with some other module folders. I want to show how the generated project folder structure looks in the final tree but ...
m4l490n's user avatar
  • 195
1 vote
0 answers
1k views

I want to preview the structure of a folder with tree -d. However, some subfolder has too many subfolders, which prevent me to preview the whole tree at a glance, so I want a argument such as --...
DawnSong's user avatar
  • 113
4 votes
2 answers
1k views

man tree1 states: -info Prints file comments found in .info files. See .INFO FILES below for more information on the format of .info files. and further .INFO FILES .info files are similiar to ....
Konrad's user avatar
  • 373
3 votes
2 answers
745 views

For the following tree structure: . └── dir1 └── dir2 └── dir3 What would be a simple way to create a file (could be empty), for every directory, so the resulting tree will look like: ...
Diego J. Sanchez's user avatar
-2 votes
2 answers
2k views

We all love the tree command, but it would be amazing to have the icons next to the files, as both the file browser of VSC or Color Ls have. Does anyone know any way to implement it?
Salomanuel's user avatar
2 votes
1 answer
954 views

I'm searching a large number of text files which are organized in various subdirectories. I can run a command such as grep -lr foobar ./, and I get results like the following: ./dirA/dirA.A/abc.txt ./...
loneboat's user avatar
  • 241
0 votes
1 answer
542 views

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-...
MCLooyverse's user avatar
3 votes
1 answer
96 views

If I have a text-file with a structured list like this: #linux ##audio ###sequenzer ####qtractor ###drummachine ####hydrogen ##scores ###lilypond ###musescore ##bureau ###kalender ####calcurse ###...
nath's user avatar
  • 6,104
2 votes
1 answer
4k views

What is the situation why ls -l returns a list of subdirectories in the form below? d????????? ? ? ? ? ? Subdirectory A tree launched on that directory returns 0 directories, 0 files for ...
XavierStuvw's user avatar
  • 1,179
0 votes
3 answers
660 views

I am using tree and diff to compare a local directory with a USB backup version of the same directory, and to identify noteworthy / discardable differences. $ cd home/dir/ $ tree --charset=ascii -af . ...
WoodrowShigeru's user avatar
0 votes
0 answers
64 views

I found a script that makes a file list. The list looks like this /home/usr/example_directory /home/usr/example_directory/file1.txt /home/usr/example_directory/file2.txt /home/usr/different_directory /...
Ctat41's user avatar
  • 23
0 votes
1 answer
6k views

There are obviously many ways to do the same job in Linux, but I recently needed to for i in xxx through a list of each item, recursively in a tree. I found a solution with tree by doing tree -fail (...
YorSubs's user avatar
  • 661
0 votes
1 answer
52 views

When you generate a tree for a large directory base with innumerable sub-directories and associated files, with -a option, often you get a large file with thousands of lines. While traversing the tree ...
Vinod's user avatar
  • 167
0 votes
1 answer
67 views

I'm trying to understand what files or build artifacts are created by the build system of a C++ project. There are 3 steps to building this project: ./autogen.sh ./configure make Is there a way I ...
justinmoon's user avatar
-1 votes
1 answer
1k views

I have millions of files which filenames are SHA256 hashes of the content. Due to performance reasons I do not want to store them in a single directory. My idea is to have directory structure based on ...
Petr's user avatar
  • 3
0 votes
1 answer
3k views

How can I use tree and either grep or find in conjunction to find, for example, csv files using ".csv" as a file extension: ├── ./Videos ├── ./vscode │   ├── ./vscode/foo.csv │   ├── ./...
Nicholas Saunders's user avatar
4 votes
1 answer
1k views

I "inherited" management of a system, whose "/opt" (and some other large directory trees) are stored in the root file system. My wish now is to create a new filesystem in the rpool ...
avl42's user avatar
  • 61
0 votes
1 answer
186 views

I am trying to index some LTO tapes (and some hard disks as well) and would like a simple output, stored in a text file. Something like the example below: ... /home/norg/Desktop/empty\ dir/ /home/norg/...
norglis's user avatar
2 votes
0 answers
629 views

I'm trying to view files modified before or after a certain date using the hierarchical output of the Unix tree command. For example, I know that one can use tree to sort files chronologically and ...
altersax's user avatar
0 votes
1 answer
3k views

I want to find user, size, modified date and full file path of all files in sub-directories starting from a dir. I have got to following so far: nohup sudo \ tree /work/mydir \ -sufiD \ --noreport \ --...
Abhishek Jain's user avatar
0 votes
2 answers
375 views

I need to draw the tree structure of the following code. cd /; mkdir a b c a/a b/a; cd a; mkdir ../e ../a/f ../b/a/g; cd../b/./; mkdir /a/k a/b ../a/./b /c I know that: cd /; (goes to root) , mkdir ...
Michael Pnrs's user avatar
2 votes
1 answer
1k views

Is there an alternative to tree command (or some way using the tree command itself) to print the directory structure horizontally? Quite often, I have a tree structure, for which I have to scroll a ...
shivams's user avatar
  • 4,735
1 vote
2 answers
2k views

I am not sure I correctly understood what is a path name component (or perhaps better written; path name-component) which I understand to be commonly abbreviated simply as "component" in the Unix &...
user avatar
1 vote
2 answers
158 views

I use the term "container file" to describe any file which practically contains one file or two or more files. Some examples would be a tar archive or a directory. Let's say I open a tar archive with ...
user avatar
5 votes
5 answers
11k views

I've been searching for this for a while and didn't get a satisfactory answer for it. I've taken this screenshot from the output of Gnu/Linux's tree command. I want to know how to draw or print lines ...
Mahmoud Farouq's user avatar
2 votes
3 answers
2k views

How to list files recursively, in alphabetical order and without lines that show exclusively folder names? For example, I can get the following output with tree --dirsfirst -fihan * -o filelist: 00.-...
terminal64's user avatar
2 votes
2 answers
652 views

I need to replace indentation in tree output with + signs so that instead of this: $ tree --noreport dir dir ├── dir1 │ ├── file1 │ └── file2 └── dir2 ├── file1 └── file2 it'd print this: ...
cprn's user avatar
  • 1,055
1 vote
1 answer
295 views

Why the last tree is not finding fstab? tree /etc -P fstab --prune /etc └── fstab 0 directories, 1 file . tree /etc -P fsta* --prune /etc └── fstab 0 directories, 1 file . tree /etc -P *...
Alex Poca's user avatar
  • 591
2 votes
1 answer
2k views

is there a nice way to combine: ls -R | grep "^[.]/" | sed -e "s/:$//" -e "s/[^\/]*\//--/g" -e "s/^/ |/" (displays directory as tree) with du -h ... (for each listed dir) Without installing any ...
xyn's user avatar
  • 23
2 votes
2 answers
4k views

I'm trying to use the tree command to list my current git directory. I want to exclude every files that match a gitignore pattern. The solution found here seems promising. Unfortunately it seems ...
ogr's user avatar
  • 261
0 votes
1 answer
161 views

So here's an excerpt of my directory tree: |-- 20070214_014700.a | |-- info | |-- processed | |-- HH.EL..BHZ | |-- AZ.AS..HHZ | |-- (hundreds more) | |-- raw | ...
LividNoodle's user avatar
0 votes
1 answer
231 views

Is there a way that I can get a resulted output to multiple locations at the same time. ls -RsgorCh >> /Users/User1/Text1.txt will print the output as a text file in the given location. I want ...
Binoyya's user avatar
0 votes
2 answers
876 views

I'm in a directory where running tree command produces something like this: ├── directory1 │  └── image_sequence │  ├── image.0001.jpg │  ├── image.0002.jpg │  ├── image.0003.jpg │  ...
Santosh Kumar's user avatar
3 votes
1 answer
4k views

I am wondering if it's possible to output the contents of a tar.gz file using tree without having to extract the contents of the file to a temp directory then using tree with that directory. I know ...
Schwagmister's user avatar
  • 1,113
2 votes
2 answers
958 views

I'm looking for a program that takes the output of iptables -S and converts it to a breadth-first listing. Why? I'm doing some work on a router using VyOS where several layers of tables are pre-...
Craig  Hicks's user avatar