Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to "tree" command or a way to reduce tree output file size?

I want to do a "tree" output file on a lot of clients but in general i found that the file size lands around 100mb.

This is WAY to big so i wanted to ask if there is any alternative way or command to do it or any way to reduce the file size?

I want to create a HDD catalog file log for later review and to be able to do some statistics with the files.

like image 395
Emil B Avatar asked Oct 25 '25 07:10

Emil B


1 Answers

For simulate the $ tree command when you are in a directory, you can use also this command:

$ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//──/g' -e 's/─/├/' -e '$s/├/└/'

Then you have a result similar to the output of $ tree command

like image 50
vscalcione Avatar answered Oct 26 '25 21:10

vscalcione



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!