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.


20 visits (3 today, 3 this week, 10 this month, 20 this year)
Uptime: 17:53:58 up 1 day, 19:05, 3 users, load average: 0.07, 0.10, 0.09
216.73.217.120 GET from server z.lam1.us

Sunday, October 4, 2026 @ 5:53:58 PM
z.ServerAdmin@lamurakami.com