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.


15 visits (3 today, 12 this week, 15 this month, 15 this year)
Uptime: 19:14:14 up 1 day, 23:44, 4 users, load average: 0.05, 0.03, 0.00
216.73.216.110 GET from server z.lam1.us

Friday, August 29, 2025 @ 7:14:14 PM
z.ServerAdmin@lam1.us