Check These Out
The -W switch of netstat makes it print complete URL of the connections, which otherwise by default
is truncated to fit its default column size.
Now to compensate for irregular column sizes, pipe the output to column (-t switch of column prints in tabular form). The only downside to this part is that the very first row, the header, goes pear shape.
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
I don't truly enjoy many commands more than this one, which I alias to be ps1.. Cool to be able to see the heirarchy and makes it clearer what need to be killed, and whats really going on.
In my case it was actually like this...
using -u is better for standardizing date output and timezones, for servers in different timezones.
you could save the code between if and fi to a shell script named smiley.sh with the first argument as and then do a smiley.sh to see if the command succeeded. a bit needless but who cares ;)
This command adds a urpmi media source called "google-chrome" to the urpmi configuration on Mandriva or Mageia. Needs to be run as root. We specify the option "--update" so that when Google provides a newer version of Google Chrome web browser in their download system then running a system update (eg: "urpmi --auto-update") will result in our copy of Google Chrome getting updated (along with any other Mandriva/Mageia pending updates).
To install Google Chrome from this source, use:
urpmi google-chrome-stable #install Google chrome web browser
ssh from local to remote and pipe output of file to the local clipboard