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.


24 visits (2 today, 7 this week, 24 this month, 24 this year)
Uptime: 23:01:06 up 3 days, 4:26, 2 users, load average: 0.02, 0.01, 0.00
216.73.216.175 GET from server z.larrymurakami.com

Wednesday, January 28, 2026 @ 11:01:06 PM
z.ServerAdmin@lamurakami.com