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.


45 visits (1 today, 8 this week, 27 this month, 45 this year)
Uptime: 06:45:51 up 22:56, 2 users, load average: 0.00, 0.00, 0.00
216.73.216.131 GET from server z.larrymurakami.com

Saturday, May 16, 2026 @ 6:45:51 AM
z.ServerAdmin@lamurakami.com