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.


1 visits (1 today, 1 this week, 1 this month, 1 this year)
Uptime: 15:22:38 up 3:58, 1 user, load average: 1.68, 1.29, 1.03
216.73.217.109 GET from server z.larrymurakami.com

Thursday, December 3, 2026 @ 3:22:38 PM
z.ServerAdmin@lamurakami.com