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.


59 visits (1 today, 2 this week, 20 this month, 59 this year)
Uptime: 15:24:26 up 17:55, 2 users, load average: 0.10, 0.04, 0.01
18.223.149.135 GET from server z.larryforalaska.com

Monday, April 14, 2025 @ 3:24:26 PM
z.ServerAdmin@lam1.us