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.


183 visits (1 today, 1 this week, 7 this month, 183 this year)
Uptime: 02:39:15 up 3 days, 18:55, 2 users, load average: 0.12, 0.07, 0.10
216.73.217.79 GET from server z.lam1.us

Sunday, July 5, 2026 @ 2:39:15 AM
z.ServerAdmin@lamurakami.com