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.


37 visits (2 today, 2 this week, 34 this month, 37 this year)
Uptime: 05:25:59 up 4 days, 13:05, 2 users, load average: 0.03, 0.04, 0.01
216.73.216.61 GET from server z.larrymurakami.com

Sunday, July 26, 2026 @ 5:25:59 AM
z.ServerAdmin@lamurakami.com