Check These Out
Just increase the 1 at the end if you want to generate more than one.
(Alternative to "| head -n N" you could use the -b flag of od: -b $[6*N]
the addition of ".bk" to the regular "pie" idiom makes perl create a backup of every file with the extension ".bk", in case it b0rks something and you want it back
Similarly, if you want to print from 10 to the end of line you can use: sed -n '10,$p' filename
This is especially useful if you are dealing with a large file. Sometimes you just want to extract a sample without opening the entire file.
Credit goes to wbx & robert at the comments section of http://www.commandlinefu.com/commands/view/348/get-line1000-from-text.#comment
This will take a screenshot of a selected area and save it as foo.png as well as sending it straight to the clipboard for pasting into GIMP, Anki, Zim, etc.
parrallel execution of a command on remote host by ssh or rsh or ...
very useful for cluster management (software update)
This is a (last resort) way to automate applications that provide no other ways for automation, it would send 'Hello world' to the currently active window. See the manpage (and the -text and -window entries) for how to send special characters and target specific windows.
An example:
Using xwininfo, I get the id of my XPlanet background window:
alanceil@kvirasim:19:51:0:~> xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x3600001 "Xplanet 1.2.0"
Absolute upper-left X: 0
(..etc..)
Now I use xvkbd to tell it to close itself:
xvkbd -xsendevent -window 0x3600001 -text "Q"
Obviously, the best way is to put these commands in a shellscript - just make sure to include a short sleep (sleep .1 should suffice) after each xvkbd call, or some programs will become confused.
Prints a string indicating whether a command is an alias, keyword, function, builtin, or file. I have used this in my BASH scripts to allow an external parameter to define which function to run, and ensure that it is a valid function that can indeed be run.