Check These Out
The platform-agnostic version of https://www.commandlinefu.com/commands/view/25276/compute-newest-kernel-version-from-makefile-on-torvalds-git-repository because macOS doesn't have wget installed
Have a grudge against someone on your network? Do a "find -writable" in their directory and see what you can vandalize! But seriously, this is really useful to check the files in your own home directory to make sure they can't inadvertently be changed by someone else's wayward script.
This is helpful for shell scripts, I use it in my custom php install script to schedule to delete the build files in 3 hours, as the php install script is completely automated and is made to run slow.
Does require at, which some environments without crontab still do have.
You can add as many commands to the at you want. Here's how I delete them in case the script gets killed. (trapped)
atq |awk '{print $1}'|xargs -iJ atrm J &>/dev/null
See "Parameter Expansion" in the bash manpage. They refer to this as "Use Alternate Value", but we're including the var in the at alternative.
usage: tpb searchterm
example: tpb the matrix trilogy
This searches for torrents from thepiratebay and displays the top results in reverse order,
so the 1st result is at the bottom instead of the top -- which is better for command line users
grabbed from Andrew Aylett post:
http://superuser.com/questions/133313/can-i-speed-up-cygwins-fork
This command is useful if you accidentally untar or unzip an archive in a directory and you want to automatically remove the files. Just untar the files again in a subdirectory and then run the above command e.g.
$ for file in ~/Desktop/temp/*; do rm ~/Desktop/`basename $file`; done
If you add the -d flag each difference in the command's output will be highlighted.
I also monitor individual drives by adding them to df. Makes for a nice thin status line that I can shove to the bottom of the monitor.
Useful for use in other scripts for renaming, testing for extensions, etc.
Use GNU/screen as a terminal emulator for anything serial console related.
screen /dev/tty
eg.
screen /dev/ttyS0 9600
MacOSX: http://www.macosxhints.com/article.php?story=20061109133825654
Cheat Sheet: http://www.catonmat.net/blog/screen-terminal-emulator-cheat-sheet/