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.


184 visits (2 today, 2 this week, 8 this month, 184 this year)
Uptime: 04:05:09 up 3 days, 20:21, 2 users, load average: 0.10, 0.05, 0.01
216.73.217.103 GET from server z.lam1.us

Sunday, July 5, 2026 @ 4:05:09 AM
z.ServerAdmin@lamurakami.com