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.


240 visits (2 today, 10 this week, 7 this month, 7 this year)
Uptime: 05:40:48 up 15 days, 11:24, 7 users, load average: 0.00, 0.01, 0.00
18.116.27.225 GET from server z.lam1.us

Thursday, January 2, 2025 @ 5:40:48 AM
z.ServerAdmin@lam1.us