Check These Out
Reload all defined kernel variables from /etc/sysctl.conf(if no parameter after -p is given) without the old myth "Ah, you'll need to reboot to apply those variables"...
No sample. Try it and see the magic!
Adjust the --resolution and --mode as required (if these options are available for your scanner).
The size options (-x, -y, -imageheight, -imagewidth) are for US letter paper. For A4, I think the command would be:
$scanimage -p --resolution 250 --mode Gray -x 210 -y 297 | pnmtops -imageheight 11.7 -imagewidth 8.3 | ps2pdf - output.pdf
I often write a one-liner which I want to use later in a script.
This captures traffic on a remote machine with tshark, sends the raw pcap data over the ssh link, and displays it in wireshark. Hitting ctrl+C will stop the capture and unfortunately close your wireshark window. This can be worked-around by passing -c # to tshark to only capture a certain # of packets, or redirecting the data through a named pipe rather than piping directly from ssh to wireshark. I recommend filtering as much as you can in the tshark command to conserve bandwidth. tshark can be replaced with tcpdump thusly:
$ ssh root@example.com tcpdump -w - 'port !22' | wireshark -k -i -
Low on disk space? Check the largest installed RPMs for delete canditates.
Frustrated with the manual domain migration process AWS has, I unsuccessfully tried to install cli53, route53-transfer. I instead wrote this oneliner to ease the export (which is not supported via the AWS console ATM).
The output can be easily pasted into the "Import Hosted Zone" dialog in Route53. SOA/NS records are excluded since they cannot be automatically imported.
This will log your internet download speed.
You can run
$gnuplot -persist
Instead of opening your browser, googling "whatismyip"...
Also useful for scripts.
dig can be found in the dnsutils package.
This example calculates the averages of column one and column two of "file.dat". It can be easily modified if other columns are to be averaged.