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.


63 visits (2 today, 3 this week, 9 this month, 63 this year)
Uptime: 23:26:37 up 10:21, 3 users, load average: 0.06, 0.07, 6.03
2600:1f28:365:80b0:4c3:3444:4978:8f3a GET from server z.larrymurakami.com

Wednesday, June 10, 2026 @ 11:26:37 PM
z.ServerAdmin@lamurakami.com