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.


72 visits (1 today, 1 this week, 57 this month, 72 this year)
Uptime: 08:02:27 up 3 days, 12:32, 2 users, load average: 0.03, 0.03, 0.00
216.73.216.16 GET from server z.larrymurakami.com

Sunday, August 31, 2025 @ 8:02:27 AM
z.ServerAdmin@lam1.us