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.


41 visits (2 today, 8 this week, 29 this month, 41 this year)
Uptime: 14:34:06 up 3 days, 2:33, 2 users, load average: 0.14, 0.06, 0.01
216.73.216.22 GET from server z.lam1.us

Wednesday, December 24, 2025 @ 2:34:06 PM
z.ServerAdmin@lam1.us