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.


108 visits (1 today, 10 this week, 8 this month, 108 this year)
Uptime: 00:51:28 up 2 days, 13:06, 2 users, load average: 0.00, 0.01, 0.00
216.73.216.217 GET from server z.lamurakami.com

Saturday, April 4, 2026 @ 12:51:28 AM
z.ServerAdmin@lamurakami.com