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.


67 visits (2 today, 5 this week, 19 this month, 67 this year)
Uptime: 12:12:06 up 13 days, 6:55, 3 users, load average: 0.28, 0.32, 0.26
216.73.217.162 GET from server z.lamurakami.com

Tuesday, November 10, 2026 @ 12:12:06 PM
z.ServerAdmin@lamurakami.com