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.


9 visits (2 today, 9 this week, 9 this month, 9 this year)
Uptime: 19:49:23 up 2 days, 1:37, 2 users, load average: 0.00, 0.00, 0.00
216.73.217.149 GET from server z.lamurakami.com

Thursday, April 23, 2026 @ 7:49:23 PM
z.ServerAdmin@lamurakami.com