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.


199 visits (1 today, 1 this week, 13 this month, 199 this year)
Uptime: 01:45:17 up 5 days, 7:13, 4 users, load average: 0.00, 0.00, 0.00
216.73.216.2 GET from server z.lamurakami.com

Sunday, July 6, 2025 @ 1:45:17 AM
z.ServerAdmin@lam1.us