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.


24 visits (2 today, 2 this week, 24 this month, 24 this year)
Uptime: 14:52:53 up 4 days, 3:33, 2 users, load average: 0.00, 0.02, 0.00
216.73.216.40 GET from server z.lam1.us

Sunday, February 22, 2026 @ 2:52:53 PM
z.ServerAdmin@lamurakami.com