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.


66 visits (1 today, 15 this week, 32 this month, 66 this year)
Uptime: 01:21:47 up 8:39, 2 users, load average: 0.03, 0.05, 0.07
216.73.216.127 GET from server z.larrymurakami.com

Saturday, March 14, 2026 @ 1:21:47 AM
z.ServerAdmin@lamurakami.com