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.


108 visits (1 today, 2 this week, 24 this month, 108 this year)
Uptime: 09:45:02 up 3 days, 17:20, 3 users, load average: 0.00, 0.00, 0.00
3.149.249.184 GET from server z.lamurakami.com

Monday, May 19, 2025 @ 9:45:02 AM
z.ServerAdmin@lam1.us