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
trap is the bash builtin that allows you to execute commands when the current script receives a particular signal.
Uses $0 for the script name, $$ for the script PID, tee to output to STDOUT as well as a log file and ps to log other running processes.
Trace python statement execution and syscalls invoked during that simultaneously
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
I find it very handy to be able to quickly see the most recently modified/created files in a directory.
Note that the "q" option will reveal any files with non-printable characters in their filename.
Only to logout all users except root
Pipe Viewer allows you to monitor the progress of a data transfer or command, or to show the time elapsed, among other things. In this use, it limits the transfer rate of the echo command to 10 bytes per second, making your text appear to be typed out in real time as in Hollywood movies. Fun!
use Linux ;)
Add permanent line numbers to a file without creating a temp file.
The rm command deletes file10 while the nl command works on the open file descriptor of file10 which it outputs into a new file again named file10.
The new file10 will now be numbered in the same directory with the same file name and content as before, but it will in fact be a new file, using (ls -i) to show its inode number will prove this.