brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tree -L 2 shows a folder structure two levels deep

Linux
~/tips/tip-tree-l-2

tree -L 2

Draws the files and folders of a directory as a tree, cut off at the depth you choose.

When I need to explain a folder layout, a tree beats a long ls every time.

tree -L 2
tree -d -L 3
tree -a -I node_modules

-L limits the depth, -d lists directories only, -I skips names that match a pattern. On Debian and Ubuntu install it with sudo apt install tree, on a Mac with brew install tree.

Further reading: tree manual page

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link