Check These Out
Efficiently clear all Windows Event log entries from within a Cygwin terminal. Uses "cygstart" to launch a hidden "PowerShell" session passing a Powershell command to loop through and clear all Windows Event Log entries. Very useful for troubleshooting and debugging. The command should in theory elevate you session if needed.
One liner is based on the PowerShell command:
$ wevtutil el | foreach { wevtutil cl $_ }
When setting up a new aliases file, or having creating a new file.. About every time after editing an aliases file, I source it. This alias makes editing alias a bit easier and they are useful right away. Note if the source failed, it will not echo "aliases sourced".
Sub in vi for your favorite editor, or alter for ksh, sh, etc.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.
Here's a version that uses perl. If you'd like a trailing newline:
$ perl -pe 's/(.)/sprintf("\\x%x", ord($1))/eg; END {print "\n"}'
This will change all files ending in .JPG to .jpg and will work with any file extension
These are simple shortcuts to pause and continue terminal output, works in most terminals and screen multiplexers like screen. You can use it to catch something if things change too fast, and scroll with Shift + PgUp PgDown. On linux console ScrollLock can also be used.
This will download all files of the type specified after "-A" from a website. Here is a breakdown of the options:
-r turns on recursion and downloads all links on page
-l1 goes only one level of links into the page(this is really important when using -r)
-H spans domains meaning it will download links to sites that don't have the same domain
-nd means put all the downloads in the current directory instead of making all the directories in the path
-A mp3 filters to only download links that are mp3s(this can be a comma separated list of different file formats to search for multiple types)
-e robots=off just means to ignore the robots.txt file which stops programs like wget from crashing the site... sorry http://example/url lol..
This command uses ping to get the routers' IP addresses to the destination host as traceroute does. If you know what I mean..