I needed to remove all fancy ANSI graphics and colors from the output of tree
, and just print something that fit a plain text file. This did the trick:
tree -L 1 --noreport -S -n --charset=US-ASCII
E.g.:
bronto@brabham:/var/cfengine/git/common$ tree -L 1 --noreport -S -n --charset=US-ASCII . |-- controls |-- libraries |-- modules |-- services |-- sources |-- templates |-- tools |-- unit `-- update.cf