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.


80 visits (2 today, 12 this week, 41 this month, 80 this year)
Uptime: 19:14:31 up 8 days, 39 min, 2 users, load average: 0.00, 0.00, 0.00
3.21.122.130 GET from server z.lamurakami.com

Saturday, April 26, 2025 @ 7:14:31 PM
z.ServerAdmin@lam1.us