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.


6 visits (3 today, 5 this week, 6 this month, 6 this year)
Uptime: 09:39:27 up 5 days, 13:29, 2 users, load average: 0.03, 0.01, 0.00
216.73.216.168 GET from server z.lamurakami.com

Monday, November 24, 2025 @ 9:39:27 AM
z.ServerAdmin@lam1.us