tree
info
The tree command can be used with or without prepending bx:// to the path.
Usage
bx tree [-fhis] [--help] [<path>]
Parameters and inputs
- Parameters
- Inputs
| Shorthand | Long version | Description |
|---|---|---|
-f | --full-path | Print the full path of the files |
-s | --size | Print the size in bytes of each file |
-h | --human | Print the size in a more human readable way |
-i | --int | Like -h, but use in SI units (powers of 1000) |
--help | Show this help message and exit |
| Input | Description | Required |
|---|---|---|
<path> | Path to show details about | false |
Examples
Structure of a directory
Create two local files, one with the content "hello" and the other with the content "goodbye".
$ echo hello > hello.txt
$ echo goodbye > goodbye.txt
Upload the files to different paths inside the test directory using the cp command.
$ bx cp hello.txt bx://test/greeting/hello.txt
hello.txt [=================================================>] 100 %
$ bx cp goodbye.txt bx://test/farewell/goodbye.txt
goodbye.txt [=================================================>] 100 %
info
The cp command will implicitly create directories in BatchX that haven't been previously created.
Use the bx tree command to display the content of the test directory.
$ bx tree bx://test
test
├── farewell
│ └── goodbye.txt
└── greeting
└── hello.txt
Adding the -s and the -h flags will also display the file size in a human readable way.
$ bx tree -sh bx://test
test
├── farewell
│ └── [8 B] goodbye.txt
└── greeting
└── [6 B] hello.txt