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.


52 visits (1 today, 4 this week, 13 this month, 52 this year)
Uptime: 08:47:04 up 7 days, 18:49, 3 users, load average: 0.00, 0.00, 0.00
18.191.97.68 GET from server z.lam1.us

Tuesday, April 8, 2025 @ 8:47:04 AM
z.ServerAdmin@lam1.us