Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Depending on the speed of you system, amount of RAM, and amount of free disk space, you can find out practically how fast your disks really are. When it completes, take the number of MB copied, and divide by the line showing the "real" number of seconds. In the sample output, the cached value shows a write speed of 178MB/s, which is unrealistic, while the calculated value using the output and the number of seconds shows it to be more like 35MB/s, which is feasible.
This is a simple command for jumping to the matching brace, square bracket, or parentheses. For example, it can take you from the beginning of a function to the end with one key stroke. To delete everything between the pairs of {}, [], or (), issue the command:
$ d%
To replace text between pairs of braces, brackets, or parentheses, issue the command:
$ c%
You can also use this command to find out if an opening brace has been properly closed.
Shows all block devices in a tree with descruptions of what they are.
If the first two letters are "ii", then the package is installed. You can also use wildcards. For example,
.
$ dpkg -l openoffice*
.
Note that dpkg will usually not report packages which are available but uninstalled. If you want to see both which versions are installed and which versions are available, use this command instead:
.
$ apt-cache policy python
First of all you need to run this command.
X :12.0 vt12 2>&1 >/dev/null &
This command will open a X session on 12th console. And it will show you blank screen. Now press Alt + Ctrl + F7. You will get your original screen.
Now run given command "xterm -display :12.0 -e ssh -X user@remotesystem &". After this press Alt + Ctrl + F12. You will get a screen which will ask you for password for remote linux system. And after it you are done. You can open any window based application of remote system on your desktop.
Press Alt + Ctrl + F7 for getting original screen.
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
Does not print any line that either:
- is empty
- contains only spaces or tabs
- starts with #
- starts with spaces/tabs followed by a #