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.


37 visits (2 today, 5 this week, 6 this month, 23 this year)
Uptime: 06:03:26 up 8 days, 13:56, 4 users, load average: 0.00, 0.01, 0.00
3.139.94.174 GET from server z.lam1.us

Wednesday, February 5, 2025 @ 6:03:26 AM
z.ServerAdmin@lam1.us