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.


105 visits (2 today, 5 this week, 32 this month, 105 this year)
Uptime: 22:41:41 up 2:07, 2 users, load average: 0.09, 0.03, 0.00
216.73.216.142 GET from server z.lam1.us

Wednesday, September 17, 2025 @ 10:41:41 PM
z.ServerAdmin@lam1.us