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.


220 visits (2 today, 6 this week, 26 this month, 220 this year)
Uptime: 23:00:58 up 4 days, 4:44, 3 users, load average: 0.00, 0.00, 0.00
18.218.1.38 GET from server z.larrymurakami.com

Saturday, December 21, 2024 @ 11:00:58 PM
z.ServerAdmin@lam1.us