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.


107 visits (1 today, 1 this week, 23 this month, 107 this year)
Uptime: 01:32:04 up 2 days, 9:07, 2 users, load average: 0.00, 0.02, 0.12
3.149.231.42 GET from server z.lam1.us

Sunday, May 18, 2025 @ 1:32:04 AM
z.ServerAdmin@lam1.us