Handy Linux Commands
ASCII file manipulation
-
cut - select portions of each line of a file
-
gron - transform JSON into discrete, greppable assignments
-
meld - interactive line-by-line merging of two files
-
sort - sort lines of text files
-
uniq - remove duplicate lines from a sorted file
-
wc - print the number of bytes, words, and lines in files
Image file manipulation
Admin tools
-
ls --color=never
or
if (type ls) == (ls --color=tty)
then (unalias ls)
also see
http://www.geekgumbo.com/2011/11/04/changing-the-directory-color-in-the-bash-shell/
-
ethtool - Display or change ethernet card settings
-
xrandr - is used to set the size, orientation and/or
reflection of the outputs for a screen. It can also
set the screen size
-
If your ATA drive supports self-tests, you should run
them on a regular basis, for example one per week:
smartctl -t long /dev/hd?
After the test has completed, you should examine the results with:
smartctl -l selftest /dev/hd?
Bash refrences
Serial
-
To enumerate the active serial ports:
dmesg | grep tty
-
minicom
- a procomm like communications program.
-
putty
- terminal emulator client for the SSH, Telnet, rlogin, and raw
TCP computing protocols and as a serial console client.
-
screen
- a full-screen window manager that multiplexes a physical terminal
between several processes (typically interactive shells).
-
stty
-
tip
- establishes a full-duplex connection to another machine, giving
the appearance of being logged in directly on the remote cpu.
-
5 commands for Connection to the Serial Console
Multiplexing Configuration Managers
Disk Utilities
-
/proc/partitions: major minor block name(sdc1).
File backup methods
-
rsync - transfer just the differences between two sets of files
Find examples
-
# Find all regular files that have been modified in the last 7 days
find / -type f -mtime 7
JavaScript
Single Board Computers (SMB)
SQL
NoSQL
Tunneling
-
SSH Tunneling
-
ssh command that keeps the session alive:
ssh -o ServerAliveInterval=10 toby@wherever