Add tree,lsusb command

The tree manages files in a way that makes it easy to preview the directory structure. The lsusb command is used to view connected devices.

Partial duplicate:

2 Likes

I’d like to see tree also, but ls -R piped through less is adequate (if not as pretty) for most use cases.

Yes ls -R is not intuitive enough, it causes the whole screen to be messed up. tree is perfect and doesn’t have too many dependencies and the binaries are very small.

What’s your TERM type? It works fine for me when TERM=xterm-256color or TERM=linux so I’m going to guess that you might have an alias that’s doing ANSI escapes. If that’s the case, try this instead:

TERM=linux command ls -lRF --color=always | less -R

When you invoke less with the -R flag, the raw mode will not be escaped, which will leave your screen appearance the same as it would be if you received ANSI escapes without the pipe. You can also invoke ls with --color=never if you don’t need or want the colored output in the first place.

Some combination of TERM settings, ls flags, and escape characters are messing up your screen. Setting up an alias for them in your ~/.bashrc or ~/.zshrc is a reasonable alternative using features currently available. YMMV.