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.


115 visits (4 today, 15 this week, 33 this month, 115 this year)
Uptime: 17:02:25 up 2 days, 9:33, 4 users, load average: 0.07, 0.04, 0.01
3.12.166.131 GET from server z.lam1.us

Friday, September 20, 2024 @ 5:02:25 PM
z.ServerAdmin@lam1.us