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.


30 visits (2 today, 2 this week, 27 this month, 30 this year)
Uptime: 07:47:29 up 15:26, 2 users, load average: 0.07, 0.07, 0.05
216.73.216.66 GET from server z.larryforalaska.com

Wednesday, July 22, 2026 @ 7:47:29 AM
z.ServerAdmin@lamurakami.com