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, 4 this week, 18 this month, 66 this year)
Uptime: 08:29:02 up 13 days, 3:11, 3 users, load average: 0.24, 0.14, 0.10
216.73.217.93 GET from server z.larrymurakami.com

Tuesday, November 10, 2026 @ 8:29:02 AM
z.ServerAdmin@lamurakami.com