How To SSH Run Multiple Command On Remote Machine And Exit Safely

Posted on in Categories , , , , , , , , , last updated March 8, 2016

I have a backup sync program on local server. I have an ssh password less login set up, and I can run commands on an external server in bash script doing:

ssh [email protected] "sync; sync; /sbin/shutdown -h now"

How do I run multiple commands in bash on a remote Unix or Linux server? What is the best Way to SSH in and Run various unix commands in bash?

How to Prevent & Disable Mac OS X From Sleeping From the Command Line Terminal Application

Posted on in Categories , , , last updated August 31, 2015

I‘m running a process to complete backup and covert images in Mac OS X laptop. I do not wish to disable sleep manually from my OS X power options (Energy Saver). How do I temporarily prevent a Mac from sleeping while my process is still active in Mac OS X Unix operating systems? How can I prevent the system from sleeping temporarily from the command prompt?