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.


195 visits (5 today, 13 this week, 9 this month, 195 this year)
Uptime: 21:50:22 up 3 days, 3:18, 4 users, load average: 0.00, 0.01, 0.00
216.73.216.135 GET from server z.lam1.us

Thursday, July 3, 2025 @ 9:50:22 PM
z.ServerAdmin@lam1.us