Check These Out
In this case the current user has proxy variable set which allows access to the rpm on the internet but needs root privs to install it.
Running sudo -E preserves the current user proxy var and allows the rpm install to be executed with sudo.
xclip -o > /tmp/spell.tmp # Copy clipboard contents to a temp file
aspell check /tmp/spell.tmp # Run aspell on that file
cat /tmp/spell.tmp | xclip # Copy the results back to the clipboard, so that you can paste the corrected text
I'm not sure xclip is installed in most distributions. If not, you can install x11-apps package
-n means refresh frequency
you could change eth0 to any interface you want, like wlan0
If the password for the share your trying to mount contains special characters you can use URL escape characters.
The above command uses an example as follows:
username: user
password: p@ss
URL Encoded password: p%40ss
All credit goes to Richard York:
http://www.smilingsouls.net/Blog/20110526100731.html
Also check out this URL Decoder/Encoder to convert your passwords.
http://meyerweb.com/eric/tools/dencoder/
This will reboot as the Grub 2 option.
You need to apt-get install python-sqlparse. This command simply formats a sql query and prints it out. It is very useful when you want to move a sql query from commandline to a shell script. Everything is done locally, so you don't need to worry about copying sql query to external websites.
I often deal with long file names and the 'ls -l' command leaves very little room for file names. An alternative is to use the -h -o and -g flags (or together, -hog).
* The -h flag produces human-readable file size (e.g. 91K instead of 92728)
* The -o suppresses the owner column
* The -g suppresses the group column
Since I use to alias ll='ls -l', I now do alias ll='ls -hog'
Shows all block devices in a tree with descruptions of what they are.
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