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.


5 visits (2 today, 3 this week, 5 this month, 5 this year)
Uptime: 16:43:43 up 6 days, 22 min, 2 users, load average: 0.00, 0.02, 0.00
216.73.216.136 GET from server z.lamurakami.com

Monday, July 27, 2026 @ 4:43:43 PM
z.ServerAdmin@lamurakami.com