There are a number of things that I do as part of my “process” that I find make my life a bit easier.
FINISHED block
There are a LOT of things that we do as an Oracle E-Business Suite DBA that can run for a long time. Because of this, we may have something running in another window and not realize that the command has finished. One trick that I use (mentioned in https://www.bluestonesolutionsgroup.com/?p=55) is to tail an ascii art file at the end of the command line. This serves a few purposes.
- It is something of an attention grabber and makes an easy way to notice that the command has finished without needing to focus my attention on that particular window.
- Using
tail -f
will, in many cases, prevent the shell from timing out and closing.
“Stacking” Multiple Commands on a single command-line
Unix/Linux allows you to “stack” multiple commands that will run in sequence. For example, while you might run three different commands (each on their own command-line):
date
ls -lat
date
They could be stacked into a single command line instead:
date;ls -alt;date
I do this quite a bit with the “date” command. This allows me to capture a “start” and “end” time for my documentation.
The one caveat, however, is that sometimes, the second “date” command will get fed into the command before and taken as a response to a prompt. So, test carefully.
The GNU Screen tool
GNU Screen is a package that can be installed on most Unix/Linux variants. The beauty of this tool is that you can detach an interactive shell session and re-attach it later on. While it’s detached, any commands that are actively running in that shell session will continue to process normally.
This is particularly useful if you’re on a network connection that might drop unexpectedly. Just re-connect, and re-attach the session.