Check These Out
Since systemd-resolved was implemented, add a DNS server have become weirder and harder than before. With this command, you can add a DNS server on-the-fly tied to an specific interface
Finds the date of the first commit in a git repository branch
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"
This command run fine on my Ubuntu machine, but on Red Hat I had to change the awk command to `awk '{print $10}'`.
Used for moving stuff around on a fileserver
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
From the man page.
lft ? display the route packets take to a network host/socket using one of several layer-4
protocols and methods; optionally show heuristic network information in transitu
-A Enable lookup and display of of AS (autonomous system) numbers (e.g., [1]). This option
queries one of several whois servers (see options 'C' and 'r') in order to ascertain the origin
ASN of the IP address in question. By default, LFT uses the pWhoIs service whose ASN data
tends to be more accurate and more timely than using the RADB as it is derived from the
Internet's global routing table.
-N Enable lookup and display of network or AS names (e.g., [GNTY-NETBLK-4]). This option
queries Prefix WhoIs, RIPE NCC, or the RADB (as requested). In the case of Prefix WhoIs or
RADB, the network name is displayed. In the case of RIPE NCC, the AS name is displayed.
When I'm testing some scripts or programs, they end up using more memory than anticipated. In that case, computer nearly halts due to swap space usage, and sometimes I have to press Magic SysRq+REISUB to reboot.
So, I was looking for a way to limit memory usage per script and found out that ulimit can limit memory. If you run it this way:
$ $ ulimit -v 1000000
.
$ $ scriptname
Then the new memory limit will be valid for that shell. I think changing the limit within a subshell is much more flexible and it won't interfere with your current shell ulimit settings.
note: -v 1000000 corresponds to approximately 1GB of RAM
This function will encrypt a bash script and will only execute it after providing the passphrase. Requires mcrypt to be installed on the system.