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.


4 visits (1 today, 4 this week, 4 this month, 4 this year)
Uptime: 19:42:58 up 2 days, 4:37, 2 users, load average: 0.06, 0.02, 0.03
216.73.216.236 GET from server z.lam1.us

Saturday, September 12, 2026 @ 7:42:58 PM
z.ServerAdmin@lamurakami.com