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.


80 visits (1 today, 4 this week, 32 this month, 80 this year)
Uptime: 11:31:53 up 4 days, 17:19, 3 users, load average: 0.06, 0.07, 0.08
18.97.14.83 GET from server z.larrymurakami.com

Wednesday, November 18, 2026 @ 11:31:53 AM
z.ServerAdmin@lamurakami.com