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.


2 visits (1 today, 2 this week, 2 this month, 2 this year)
Uptime: 11:59:12 up 17 days, 18:06, 2 users, load average: 0.08, 0.12, 0.09
216.73.216.122 GET from server z.larrymurakami.com

Tuesday, September 22, 2026 @ 11:59:12 AM
z.ServerAdmin@lamurakami.com