Check These Out
Useful to detect number of tabs in an empty line, DOS newline (carriage return + newline).
A tool that can help you understand why your parsing is not working.
e.g.
$ manswitch grep -o
This will take you to the relevant part of the man page, so you can see the description of the switch underneath.
Use the AWS CLI tools to generate a list instances, then pipe them to JQ to show only their launch time and instance id. Finally use sort to bring them out in runtime order. Find all those instances you launched months ago and have forgotten about.
Very helpful when you've got complex filenames and needs to change just some small parts of it.
Renaming a file called "i-made-a-small-typo-right-here" to "i-made-a-big-typo-right-here":
$ mv -vi i-made-a-{small,big}-typo-right-here
You could also copy multiple files, edit, remove, process, etc.
Say you just typed a long command like this:
$ rsync -navupogz --delete /long/path/to/dir_a /very/long/path/to/dir_b
but you really want to sync dir_b to dir_a. Instead of rewriting all the command line, just type followed by , and your command line will read
$ rsync -navupogz --delete /very/long/path/to/dir_b /long/path/to/dir_a
This command will sort the contents of FILENAME by redirecting the output to individual .txt files in which 3rd column will be used for sorting. If FILENAME contents are as follows:
foo foo A foo
bar bar B bar
lorem ipsum A lorem
Then two files called A.txt and B.txt will be created and their contents will be:
A.txt
foo foo A foo
lorem ipsum A lorem
and B.txt will be
bar bar B bar
We don't use CPU scaling, but just in case you do, there is something interesting to note. If you look at the /proc/cpuinfo, the speed listed is current running speed of the processors and not the real speed of the chip.
Note: you'll want to set up pub-key ssh auth. Gives you a quick means of changing volume/tracks/etc for rhythmbox on a remote machine. E.g.:
rc --next # Play next track
rc --print-playing # Grab the name
rc --volume-down
rc --help
Other logs can be monitored similarly, e.g.
$ watch "tail -15 /var/log/daemon.log"