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.


56 visits (2 today, 2 this week, 2 this month, 56 this year)
Uptime: 19:51:21 up 3 days, 23:53, 1 user, load average: 0.00, 0.00, 0.00
216.73.216.214 GET from server z.lamurakami.com

Wednesday, June 3, 2026 @ 7:51:21 PM
z.ServerAdmin@lamurakami.com