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.


7 visits (2 today, 2 this week, 7 this month, 7 this year)
Uptime: 22:37:39 up 1 day, 12:46, 3 users, load average: 0.16, 0.14, 0.10
216.73.216.152 GET from server z.lamurakami.com

Sunday, September 27, 2026 @ 10:37:39 PM
z.ServerAdmin@lamurakami.com