This script recursively traverses through a specified directory (or defaults to / if no directory is provided) and generates a file tree representation using Unicode characters to depict the hierarchy.
The generated file tree is output to a text file named tree.txt, which is saved in the same directory as the script.
Clone the repository:
git clone https://github.com/apple-fritter/DirecTree.git
Navigate to the project directory:
cd DirecTree
Run the script:
./tree.sh
If you want to specify a different directory, you can provide the path as an argument:
./tree.sh /path/to/directory
The file tree will be generated, and a file named tree.txt will be created in the same directory as the script.
Below is an example output generated by the script:
. (current directory)
ββββ documents
β ββββ text_documents
β β ββββ notes.txt
β β ββββ draft.txt
β ββββ spreadsheets
β ββββ budget.xlsx
β ββββ expenses.xlsx
ββββ pictures
ββββ vacation
β ββββ beach.jpg
β ββββ mountains.jpg
ββββ family
β ββββ reunion.jpg
β ββββ wedding.jpg
ββββ pets
ββββ cat.jpg
ββββ dog.jpg
This software is provided "as is" and without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
The authors do not endorse or support any harmful or malicious activities that may be carried out with the software. It is the user's responsibility to ensure that their use of the software complies with all applicable laws and regulations.
These files released under the MIT License.