Check These Out
It grabs all the database names granted for the $MYSQLUSER and gzip them to a remote host via SSH.
Here's a way to wait for a file (a download, a logfile, etc) to stop changing, then do something. As written it will just return to the prompt, but you could add a "; echo DONE" or whatever at the end.
This just compares the full output of "ls" every 10 seconds, and keeps going as long as that output has changed since the last interval. If the file is being appended to, the size will change, and if it's being modified without growing, the timestamp from the "--full-time" option will have changed. The output of just "ls -l" isn't sufficient since by default it doesn't show seconds, just minutes.
Waiting for a file to stop changing is not a very elegant or reliable way to measure that some process is finished - if you know the process ID there are much better ways. This method will also give a false positive if the changes to the target file are delayed longer than the sleep interval for any reason (network timeouts, etc). But sometimes the process that is writing the file doesn't exit, rather it continues on doing something else, so this approach can be useful if you understand its limitations.
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..
Using this command you can track a moment when usb device was attached.
Trace python statement execution and syscalls invoked during that simultaneously
Any changes to BASH shell made in .bashrc will be active in the current terminal window from the moment you execute this command, ie. aliases, prompt settings etc. No need to restart terminal.
(In BASH 'source' simile to 'eval' lets you generally execute any bunch of commands stacked in a text file).
Not a discovery but a useful one nontheless.
In the above example date format is 'yyyymmdd'. For other possible formats see 'man date'.
This command can be also very convenient when aliased to some meaningful name:
$ alias mkdd='mkdir $(date +%Y%m%d)'
This command, taken from play's manual page, plays a synthesized guitar tone for each of the strings on a standard tuned guitar.
The command "play" is a part of the package "sox".