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.


88 visits (1 today, 7 this week, 5 this month, 88 this year)
Uptime: 03:23:17 up 4 days, 8:08, 2 users, load average: 0.00, 0.00, 0.00
216.73.216.216 GET from server z.larrymurakami.com

Wednesday, September 2, 2026 @ 3:23:17 AM
z.ServerAdmin@lamurakami.com