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.


239 visits (1 today, 9 this week, 6 this month, 6 this year)
Uptime: 03:54:46 up 15 days, 9:38, 7 users, load average: 0.00, 0.00, 0.00
3.140.188.195 GET from server z.lamurakami.com

Thursday, January 2, 2025 @ 3:54:46 AM
z.ServerAdmin@lam1.us