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.


8 visits (3 today, 3 this week, 8 this month, 8 this year)
Uptime: 21:12:18 up 8 days, 1:36, 4 users, load average: 0.01, 0.02, 0.00
216.73.216.141 GET from server z.lamurakami.com

Sunday, February 15, 2026 @ 9:12:18 PM
z.ServerAdmin@lamurakami.com