Check These Out
Not my script. Belongs to mathewbauer. Used without his permission.
This script gives a single line as shown in the sample output.
NOTE: I have blanked out the IP address for obvious security reasons. But you will get whatever is your IP if you run the script.
Tested working in bash.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Assumed dir A, B, C are subdirs of the current dir
Exact syntax of the command is:
rsync -v -r --size-only --compare-dest=/path_to_A/A/ /path_to_B/B/ /path_to_C/C/
(do not omit end-slashes, since that would copy only the names and not the contents of subdirs of dir B to dir C)
You can replace --size-only with --checksum for more thorough file differences validation
Useful switch:
-n, --dry-run perform a trial run with no changes made
Top 30 History Command line with histogram display
This sorts files in multiple directories by their modification date. Note that sorting is done at the end using "sort", instead of using the "-ltr" options to "ls". This ensures correct results when sorting a large number of files, in which case "find" will call "ls" multiple times.
Actually 'firefox' is a script that then launches the 'firefox-bin' executable. You need to specify the 'no-remote' option in order to launch remote firefox instead of your local one (this drove me crazy time ago)
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