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.


109 visits (2 today, 11 this week, 9 this month, 109 this year)
Uptime: 02:06:43 up 2 days, 14:21, 2 users, load average: 1.00, 0.91, 0.55
216.73.216.217 GET from server z.lamurakami.com

Saturday, April 4, 2026 @ 2:06:43 AM
z.ServerAdmin@lamurakami.com