Commands tagged ebuilds (3)

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

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

find files in a date range
Find files in a specific date range - in this case, the first half of last year. -newermt = modification time of the file is more recent than this date GNU find allows any date specfication that GNU date would accept, e.g. $ find . -type f -newermt "3 years ago" ! -newermt "2 years ago" or $ find . -type f -newermt "last monday"

Create higher quality gif from videos
I had to compress it a bit to meet the 255 limit. See sample for full command (274) usage: ffgif foo.ext Supports 3 arguments (optional) ffgif filename seek_time time_duration scale ffgif foo 10 5 320 will seek 10 seconds in, convert for 5 seconds at a 320 scale. Default will convert whole video to gif at 320 scale. Inspiration -

Set up alarm with fade-in, for graceful awakening
There are a lot of commands, which invokes your player at specified time. But I prefer not to jump from by bed, when alarm start to play. Instead, this script increases volume of mpd over time, which much more pleasant when you just woke up :)

List all available commands (bash, ksh93)

Get your commandlinefu points (upvotes - downvotes)
This version prints current votes and commands for a user. Pass the user as an argument. While this technically "fits" as a one liner, it really is easier to look at as a shell script with extra whitespace. :)

Want to known what time is it in another part of the world ?
available timezone can be found in /usr/share/zoneinfo. Other examples: $ TZ=Europe/Paris date; TZ=Australia/Sydney date; TZ=America/New_York date this is based on zoneinfo files on macosx. Your mileage my vary on other unix dialects

Get AWS temporary credentials ready to export based on a MFA virtual appliance
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token. This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use: `awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'` You must adapt the command line to include: * $MFA_IDis ARN of the virtual MFA or serial number of the physical one * TTL for the credentials

Convert JSON to YAML
Requires installing json2yaml via npm: npm install -g json2yaml (can also pipe from stdin) Ref:

Reclaim standard in from the tty for a script that is in a pipeline
This will grab the controlling tty regardless of what STDOUT and STDERR are doing.

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: