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.


8 visits (2 today, 4 this week, 8 this month, 8 this year)
Uptime: 21:19:21 up 2:29, 2 users, load average: 0.00, 0.00, 0.00
3.144.98.0 GET from server z.lamurakami.com

Tuesday, March 11, 2025 @ 9:19:21 PM
z.ServerAdmin@lam1.us