Convert any text you type into sha1 Show Sample Output
echo 'Current hour' hour=$(date +%H) if [ $hour -gt 9 -a $hour -lt 23 ]; then echo -n '*'; else echo -n '#'; fi; echo ' '$hour; echo 'Test around the clock:' for hour in {0..23} {0..23}; do if [ $hour -gt 9 -a $hour -lt 23 ]; then echo -n '*'; else echo -n '#'; fi; echo ' '$hour; done echo 'If you need to depend on UTC, just add `-u` flag to `date` command' Show Sample Output
Adds up the used disk space on all hard drives that are directly connected to the machine (i.e. no network mounts etc.) Assumes there are no IDE drives present. Show Sample Output
Order and uniq
A way for tracking times in bash Show Sample Output
Just add a format to chronometer in bash Show Sample Output
to find and cut between to strings with grep and cut Show Sample Output
Will prepend date and time in the following format: dd-mm-yyyy@hh:mm:ss (24hours format) and redirect it to make.out file Show Sample Output
This command calculates the XOR from two given HEX numbers ($1 and $2) Show Sample Output
The given file may contain any kind of characters. This is compatible for most simple mathematical operation. For the first number found, it will be replaced by the result of a factor operation of 1000. To change the filename or multiplactor or number regular expression, change the first fixed values. Show Sample Output
Show file count into directories. Usefull when you try to find hugh directories that elevate system CPU (vmstat -> sy) Show Sample Output
splitting email by @ with awk Show Sample Output
Disable password expiration and clear password history for VMware vcenter appliance
This one uses the history modificator :q to automatically quote previous command. It resolves the already in quotes and by using the single quote it prevents resolving variables on execution. Sample output omits the redirection to file to show the problem essence. Show Sample Output
commandlinefu.com 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: