Check These Out
Benchmark a SQL query against MySQL Server.
The example runs the query 10 times, and you get the average runtime in the output. To ensure that the query does not get cached, use `RESET QUERY CACHE;` on top in the query file.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
That works in all softs, CLI or GUI... I don't want to waste time to all the time typing the same stuff . So, I have that command in my window manager shortcuts ( meta+l ). All the window managers have editable shortcuts AFAIK. If not, or you don't want to use it that way, you can easily use the xbindkeys soft.
I you're using kde4, you can run :
$ systemsettings
then open "inputs actions" and create a new shortcut.
For Gnome take a look there : http://www.cyberciti.biz/faq/howto-create-keyboard-shortcuts-in-gnome/
A more advanced one, with strings and newlines :
$ xvkbd -xsendevent -text "---8
A text file contains thousands of numbers. This command prints lines were the number is greater or equal than a specified value (134000000).
replace "directory name with files to add to DVD" with actual directory containing files you want to add to growable DVD
This is a simple case of recursing through all directories, adding the '.bak' extension to every file. Of course, the 'cp $file $file.bak' could be any code you need to apply to your recursion, including tests, other functions, creating variables, doing math, etc. Simple and clean recursion.
Adjust the
$ head -c
part for password length.
I use filenames like "hans@commandlinefu.com.gpg" and a vim which automatically decrypts files with .gpg suffixes.
Example :
$ vim /etc/fstab
## damn
$
$ sudo
## like a boss.
Example 2 :
$ sudo vim /root/bin/
##uh... autocomplete doesn't work...
$
$ sudo ls /root/bin
##ah! that's the name of the file!
$ sudo vim /root/bin/ ##resume here! Thanks readline!
You can also cut charactes starting from X to N.