• Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Ubuntu,  Unix,  VMware,  Xsan

    5 Ways To Manage Background Jobs In A Shell Environment

    When running commands that are going to take awhile, I frequently start them with the nohup command, disown the command from the current session or queue them for later execution. The reason is that if I’m running them from a Terminal or SSH session and the session is broken I want to make sure they complete. To schedule a job for later execution, use at. For example, if I want to perform a simple command, I can schedule it in a minute by running it as an echo piped to at: echo "goldengirlsfix.sh" | at now + 2 minutes Note, if using 1 minute, you’ll need that to be singular.…

  • Mac OS X

    Logger In Bash

    When bash scripting, a useful command is logger. The logger command allows you to “make entries in the system log.” When using the logger command, you can write to your own entries to the system log. To show how this command works, we’re going to open two terminal windows, preferably side-by-side. In one window, we’re going to look at the output of the system.log file interactively using the tail command with the -f option tail -f /private/var/log/system.log In the other window, we’re going to simply enter the logger command followed by the word frogger: logger frogger This will show you an entry similar to the following: Jun 3 00:34:44 ce.pretendco.com…

  • Mac OS X Server,  Mass Deployment

    Managing DNS Using Mac OS X Mountain Lion Server

    The most impactful aspect of the changes in OS X Mountain Lion Server at first appears to be the fact that DNS looks totally different in the Server app than it did in Server Admin. For starters, most of the options are gone from the graphical interface and it looks a lot less complicated, meaning that there are indeed fewer options. However, all of the options previously available are still there. And, the service behaves exactly as it did before, down to the automatically created host name when a server is configured and doesn’t have correctly configured forward and reverse DNS records that match the host name of the computer.…

  • Mac OS X,  Mac OS X Server,  Ubuntu,  Unix

    Mac OS X: tail

    I was on the phone with someone earlier today and they didn’t realize that they could dynamically watch new lines come into log files in Mac OS X.  In order to do this you can use the tail command with the -f switch.  So if you want to watch your system.log file and run some processes you think will cause errors you can use the following command: tail -f system.log When you’re done watching the log file use the Control-C keystroke to stop.