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.


28 visits (4 today, 4 this week, 15 this month, 28 this year)
Uptime: 22:27:51 up 11 days, 23:39, 3 users, load average: 0.26, 0.16, 0.11
216.73.216.115 GET from server z.larrymurakami.com

Wednesday, October 14, 2026 @ 10:27:51 PM
z.ServerAdmin@lamurakami.com