Commands tagged hdparm (6)

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

list files recursively by size

Get and read log from remote host (works with log on pipe, too)

Show what PID is listening on port 80 on Linux

get a random command
This command will show an random command. this is useful if you want to explore various random commands.

Convert camelCase to underscores (camel_case)
Useful for switching over someone else's coding style who uses camelCase notation to your style using all lowercase with underscores.

convert several jpg into one pdf file
require ImageMagick and GhostScript paquet

Lookup errno defintions
Calls the POSIX strerror() function to look up the meaning of integer ERRNOs set by some functions.

wrap long lines of a text
wraps text lines at the specified width (90 here). -s option is to force to wrap on blank characters -b count bytes instead of columns

Convert seconds to [DD:][HH:]MM:SS
Converts any number of seconds into days, hours, minutes and seconds. sec2dhms() { declare -i SS="$1" D=$(( SS / 86400 )) H=$(( SS % 86400 / 3600 )) M=$(( SS % 3600 / 60 )) S=$(( SS % 60 )) [ "$D" -gt 0 ] && echo -n "${D}:" [ "$H" -gt 0 ] && printf "%02g:" "$H" printf "%02g:%02g\n" "$M" "$S" }

a function to create a box of '=' characters around a given string.
First argument: string to put a box around. Second argument: character to use for box (default is '=') Same as command #4962, cleaned up, shortened, and more efficient. Now a ' * ' can be used as the box character, and the variables get unset so they don't mess with anything else you might have. They marked c++ as a function for this command, but I'm not sure why. Must be a bug.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: