LQ Poll: What's your favorite Linux terminal trick?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If by terminal you mean terminal emulator like xterm or urxvt, the most useful is an "identframe" script which annotates thew window banner with hostname, username and tty numbere. This is invoked by .cshrc on all our machines (so when one ssh's there, one knows where one is, and is "invoked back" exiting by aliases like ssh !* ; identframe). I attach the version I am using (with escape sequences for a lot of old obsoleted terminals).
Over the years, I have tried several ways to find more space on filesystems which, just inevitably, seem to fill up over time.
It was always a pain until I discovered ncdu. This is a little utility which does one thing and does it well.
ncdu sorts files & directories by size, biggest first.
It then allows you to delete the file/folder using a simple highlight bar and pressing the letter 'd'. You then get a confirmation dialog (in case you pressed 'd' accidentally).
There is the ability to invoke a shell if you need to examine the contents of the file first.
This utility, ncdu has become my absolute must-have command for managing filesystem space.
As the saying goes, "Never leave home without it!"
Over the years, I have tried several ways to find more space on filesystems which, just inevitably, seem to fill up over time.
It was always a pain until I discovered ncdu. This is a little utility which does one thing and does it well.
ncdu sorts files & directories by size, biggest first.
It then allows you to delete the file/folder using a simple highlight bar and pressing the letter 'd'. You then get a confirmation dialog (in case you pressed 'd' accidentally).
There is the ability to invoke a shell if you need to examine the contents of the file first.
This utility, ncdu has become my absolute must-have command for managing filesystem space.
As the saying goes, "Never leave home without it!"
Over the years, I have tried several ways to find more space on filesystems which, just inevitably, seem to fill up over time.
It was always a pain until I discovered ncdu. This is a little utility which does one thing and does it well.
ncdu sorts files & directories by size, biggest first.
It then allows you to delete the file/folder using a simple highlight bar and pressing the letter 'd'. You then get a confirmation dialog (in case you pressed 'd' accidentally).
There is the ability to invoke a shell if you need to examine the contents of the file first.
This utility, ncdu has become my absolute must-have command for managing filesystem space.
As the saying goes, "Never leave home without it!"
This means you need to add the following line to your /etc/sysctl.conf:
Code:
kernel.sysrq=244
You will need to to reboot to have this effective (or you may avoid a reboot by enabling it with (as root): echo 244 > /proc/sys/kernel/sysrq).
Then, the magic can operate: In case of fatal system issues that you cannot solve another way, instead of a brutal power-off, just hold the <alt> and <sysrq> keys, then, in sequence, press the 'R', 'E', 'I', 'S', 'U', and 'B' keys.
The actions will be the following:
R: switch keyboard to XLATE (ASCII) mode.
E: send SIGTERM signal to all processes (except init). Should allow (well written) processes to exit a clean way (save files, etc...)
I: send SIGKILL signal to all processes (except init). Data not saved in previous step will be lost
S: write all caches data to disk (will reduce risk of data corruption)
U: remount all mounted filesystems read-only
B: reboot
You should wait between each key, to give the system enough time to execute the operations.
man -t ls | ps2pdf - output.pdf
man ls | roff2pdf > output.pdf
man -P cat ls > output.txt
man ls | roff2text > output.txt
man ls | col -b > output.txt
man -t ls | ps2ascii - output.txt
man ls | roff2html > output.html
man ls | groff -mandoc -Thtml > output.html
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.