Check These Out
ethtool is used for querying settings of an ethernet device and changing them. In this example I setup 100 Mb/s full duplex on my Linux Box
Shows "Bang!" in a chance of 1 out of 6, like in the original game with the gun (spin every round). Otherwise, echoes "Click...". If feeling brave you can also do:
$[ $[ $RANDOM % 6 ] == 0 ] && echo 'Bang!' && a really killer command || echo 'Click...'
Replace 'csv_file.csv' with your filename.
Look for an rpm that supplies a specific file that you don't yet have installed.
extremely useful when you need something and don't know where it is.. or what its called.
note: uses grep like syntax.
`blkid` is an interface to libuuid - it can read Device Mapper, EVMS, LVM, MD, and regular block devices.
-c /dev/null - Do not use cached output from /etc/blkid.tab or /etc/blkid/blkid.tab (RHEL)
-i - Display I/O Limits (aka I/O topology) information (not available in RHEL)
-p - Low-level superblock probing mode (not available in RHEL)
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
Lists the local files that are not present in the remote repository (lines beginning with ?)
and add them.
jq is amazing for manipulating json on the commandline, but the developers have some weird ideas about how to handle shell redirections. This command works around them.
Further reading: https://github.com/stedolan/jq/issues/1110
Print the IP address and the Mac address in the same line