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.


80 visits (1 today, 10 this week, 46 this month, 80 this year)
Uptime: 06:15:44 up 1 day, 23:43, 2 users, load average: 0.00, 0.02, 0.02
216.73.216.44 GET from server z.larryforalaska.com

Thursday, March 19, 2026 @ 6:15:44 AM
z.ServerAdmin@lamurakami.com