Preliminary Exercises

2.2. Preliminary Exercises

  1. System administrators often write scripts to automate common tasks. Give several instances where such scripts would be useful.

  2. Write a script that upon invocation shows the time and date, lists all logged-in users, and gives the system uptime. The script then saves this information to a logfile.


53 visits (2 today, 6 this week, 3 this month, 3 this year)
Uptime: 10:05:00 up 22:35, 2 users, load average: 0.04, 0.02, 0.00
216.73.216.186 GET from server z.larrymurakami.com

Friday, January 2, 2026 @ 10:05:00 AM
z.ServerAdmin@lam1.us