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.


5 visits (3 today, 5 this week, 5 this month, 5 this year)
Uptime: 09:58:21 up 8 days, 17:51, 4 users, load average: 0.13, 0.06, 0.01
3.144.179.230 GET from server z.lamurakami.com

Wednesday, February 5, 2025 @ 9:58:21 AM
z.ServerAdmin@lam1.us