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: less -S stops long lines wrapping in the terminal

Terminal
~/tips/tip-terminal-less-s-chop-lines

ps aux | less -S

Keeps wide output on one line per row and lets you scroll sideways.

Wide tables turn into a mess when the terminal wraps them.

ps aux | less -S
less -S /var/log/nginx/access.log

-S chops lines at the window edge, and the left and right arrow keys scroll sideways. You can toggle it inside less by typing -S and pressing Enter. Combine it with -N for line numbers. Press q to quit. A long line is only hidden, not cut from the data, so search with / still finds text off screen.

Further reading: less manual page

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link