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
The execution of this command will install a LAMP server (Linux, Apache, MySQL and PHP) in a Debian based distribution. For example, in Ubuntu.
This relies on a public API from http://longurl.org. So, this has the weakness that if the service disappears, the function will break. However, it has the advantage that the shortened URL service will not be tracking your IP address and other metrics, but instead will track longurl.org. Thus, you can remain anonymous from the shortened URL services (although not anonymous from longurl.org). It does no sanity checking that you have provided an argument. If you do not provide one, "message" is displayed to STDOUT.
Using this command you can track a moment when usb device was attached.
if you want to see all information about a package use: rpm -qi pkgname
full list of querytags can be accessed by the command: rpm --querytags
you can also customize the query format how ever you like with using more querytags together along with escape sequences in "man printf"! you can also use more than one package name.
for example this command shows name and version in to columns: rpm -q --queryformat %-30{NAME}%{VERSION}\\n pkg1 pkg2
Low on disk space? Check the largest installed RPMs for delete canditates.
Instead of using force un-mounting, it's better to find the processes that currently use the relevant folder.
Taken from:
http://www.linuxhowtos.org/Tips%20and%20Tricks/findprocesses.htm
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"
}
Using this command you can track a moment when usb device was attached.