I use the following command to print a directory structure to a file:
tree -h somepath/ > tree_of_somepath.txt
tree gives a nice colorized output on the terminal, but as expected this cannot be redirected to a text file. I would like to print the output of tree to a pdf file and preserve the color.
Any ideas?
tree -n -d --charset unicode > file. It's definitely not as pretty, but I use it with a monochrome laser printer when I'm herding my data files, etc.. – Joe Jul 15 '15 at 21:18