mywiki/tree.md

84 lines
1.5 KiB
Markdown
Raw Normal View History

2023-03-25 17:32:11 +01:00
# tree
![FSH](./asset/fsh/fsh.png)
## Installazione
```bash
sudo apt install tree
```
## Utilizzo
### Elencare solo le directory
```bash
tree -d target_directory
tree -d Documenti/
Documenti/
└── repos
├── cineforum
│   ├── Fonts
│   └── Img
├── mywiki
│   └── asset
│   ├── calcurse
│   ├── debian
│   ├── fairphone
│   ├── fstab
│   ├── git
│   ├── kde
│   ├── logseq
│   ├── markdown
│   ├── nas
│   ├── neofetch
│   ├── nextcloud
│   ├── pull-request
│   ├── rofi
│   └── vim
└── notes
22 directories
```
### Elencare i file nascosti
Utilizzare l'opzione `-a`
```bash
tree -a Databases/
Databases/
├── .conf
└── filmdb.sql
1 directory, 2 files
```
### Includere il percorso
```bash
tree -f directory
```
### Elenca file e directory in base al livello
È possibile specificare i livelli aggiungendo il numero del livello all'opzione `-L`:
```bash
tree -L 1 Scaricati/
Scaricati/
├── Download
├── Telegram Desktop
└── zfs.pdf
3 directories, 2 files
```
### Autorizzazioni e dimensione
```bash
tree -ph music
```
## Collegamenti
- [https://linuxhandbook.com/tree-command/](https://linuxhandbook.com/tree-command/)