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.


222 visits (2 today, 6 this week, 36 this month, 222 this year)
Uptime: 12:18:33 up 13 days, 17:46, 2 users, load average: 0.00, 0.02, 0.00
216.73.216.239 GET from server z.lamurakami.com

Monday, July 14, 2025 @ 12:18:33 PM
z.ServerAdmin@lam1.us