Check These Out
This command will find the biggest files recursively under a certain directory, no matter if they are too many. If you try the regular commands ("find -type f -exec ls -laSr {} +" or "find -type f -print0 | xargs -0 ls -laSr") the sorting won't be correct because of command line arguments limit.
This command won't use command line arguments to sort the files and will display the sorted list correctly.
Handy if you are installing a new server or recovering an old one and you have a passwd file with the accounts you want to add to the server. If you edit the file so that only the accounts that you want to add are left this line will spit out the correct useradd lines. The uid, gecos and shell will be preserved.
From the other machine open a web navigator and go to ip from the machine who launch netcat, http://ip-address/
If you have some web server listening at 80 port then you would need stop them or select another port before launch net cat ;-)
* You need netcat tool installed
Replaces A with B in binary file "orig" and saves the result to "new". You must have the hex representations of A & B. Try od: echo -e "A\c" | od -An -x
A simple way yo do a progress bar like wget.
Instead of typing separate commands to create various subfolders, we can create multiple subfolders by listing them between brackets and separated by commas.
Using this command you can track a moment when usb device was attached.
Shows all block devices in a tree with descruptions of what they are.
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
-k (kill option ) . To kill all processes accessing this port