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.


10 visits (1 today, 6 this week, 10 this month, 10 this year)
Uptime: 16:57:06 up 22:06, 2 users, load average: 0.00, 0.00, 0.00
18.222.142.186 GET from server z.larrymurakami.com

Wednesday, March 12, 2025 @ 4:57:06 PM
z.ServerAdmin@lam1.us