I use the command tree very often in command line (in Mac) and the tree structure of my current directory is listed as follows:
└── A\ File\ with\ Space.mp4
Is there an option to avoid displaying those back slashes?
My tree command has a -N option to print non printable chars as is.
tree -N
.
├── a dirname with spaces
└── myscript.sh
Otherwise, you could use printf and xargs:
tree | xargs -L 1 -I xxxx printf "%s\n" xxxx
.
├── a dirname with spaces
└── myscript.sh
Special chars in names are going to break it or display surprising result: \n ' " * etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With