cat can be used to print the contents of a file in a Terminal, and it’s often useful to number each line of the output (including empty lines). Adding line numbers is as simple as adding the -n switch to the command: cat -n filename.txt Example Output, with -n switch: $ cat -n filename.txt 1 Line …
Tag Archives: unix
Vim Text Editor: Use Spaces Instead of Tabs
By default, Vim uses tabs instead of spaces when you press the tab button. There is an ongoing argument around the internet (which we won’t go into now, but may in the future!) on what you should use, but, either way, you may want/need to change your tabs to spaces. These are often called “soft …
Continue reading “Vim Text Editor: Use Spaces Instead of Tabs”
Monitoring the Status of Multiple Linux/BSD/OSX/Unix Hosts
daz@scampi:~$ ruptime You may run multiple Linux servers, or BSD servers, or even AIX servers, and need to monitor uptime, load averages, and users logged in from one central point. @davetaylor on Twitter asked for the output of the ruptime command, which got me looking into the command in more detail – hence this post! …
Continue reading “Monitoring the Status of Multiple Linux/BSD/OSX/Unix Hosts”