Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
This is what I came up to generate XKCD #936 style four-word password.
Since first letter of every word is capitalized it looks a bit more readable to my eyes.
Also strips single quotes.
And yes - regex is a bit of a kludge, but that's the bes i could think of.
Show disk space info, grepping out the uninteresting ones beginning with ^none while we're at it.
The main point of this submission is the way it maintains the header row with the command grouping, by removing it from the pipeline before it gets fed into the sort command. (I'm surprised sort doesn't have an option to skip a header row, actually..)
It took me a while to work out how to do this, I thought of it as I was drifting off to sleep last night!
This uses the "command-line print" plugin for Firefox (http://torisugari.googlepages.com/commandlineprint2). This same plugin can also produce PNGs. On *nix, the file must exist; therefore the touch bit in front. Also, firefox seems to ignore saved user preferences when "printing" this way (margins, header, footer, etc.), so I had to tweak my ~/.mozilla/firefox/xxxxxxxx.default/prefs.js file by hand. Yup, that's *prefs.js* not user.js - apparently, firefox ignores my user.js file too...
This is a better version, as it does no command piping, uses for instead of while loops, which allows for a list of files in the current working directory to be natively processed. It also uses the -v/verbose option with mv to let you know what the command is doing.
While the command does exactly the same in a better way, I would modify the sed option to replace spaces with underscores instead, or dashes.
Please note that you'll receive errors with this command as it tries to rename files that don't even have spaces.
This is an alternative to: http://www.commandlinefu.com/commands/view/8761/renames-all-files-in-the-current-directory-such-that-the-new-file-contains-no-space-characters.
Show the current load of the CPU as a percentage.
Read the load from /proc/loadavg and convert it using sed:
Strip everything after the first whitespace:
$ sed -e 's/ .*//'
Delete the decimal point:
$ sed -e 's/\.//'
Remove leading zeroes:
$ sed -e 's/^0*//'
Instead of calculating the offset and providing an offset option to mount, let lomount do the job for you by just providing the partition number you would like to loop mount.
When some console full-screen program (minicom, vi, some installers) breaks down your terminal, try this command to revert all options to "sane" settings (sane is a built-in combo of a lot of stty options)