Command Line Fu

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

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

Shows all block devices in a tree with descruptions of what they are.

This command is useful for renaming a clipart, pic gallery or your photo collection. It will only change the big caps to small ones (on the extension).

copy files to a ssh server with gzip compression

Next time you are leaching off of someone else’s wifi use this command before you start your bittorrent …for legitimate files only of course.
It creates a hexidecimal string using md5sum from the first few lines of /dev/urandom and splices it into the proper MAC address format. Then it changes your MAC and resets your wireless (wlan0:0).

Converts the first letter of each word to upper case

Executes the previously-run command constantly until it returns 0 (success). Put a

I’ve been using it in a script to build from scratch proxy servers.

Read More



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments