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.


230 visits (1 today, 10 this week, 36 this month, 230 this year)
Uptime: 12:37:37 up 10 days, 18:21, 5 users, load average: 0.00, 0.00, 0.00
3.142.130.127 GET from server z.larryforalaska.com

Saturday, December 28, 2024 @ 12:37:37 PM
z.ServerAdmin@lam1.us