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.


90 visits (1 today, 1 this week, 1 this month, 34 this year)
Uptime: 18:42:23 up 7 days, 7 min, 2 users, load average: 0.15, 0.08, 0.02
216.73.216.36 GET from server z.larryforalaska.com

Sunday, February 1, 2026 @ 6:42:23 PM
z.ServerAdmin@lamurakami.com