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.


86 visits (1 today, 3 this week, 52 this month, 86 this year)
Uptime: 12:05:13 up 6 days, 5:32, 2 users, load average: 0.14, 0.11, 0.05
216.73.216.179 GET from server z.lam1.us

Monday, March 23, 2026 @ 12:05:13 PM
z.ServerAdmin@lamurakami.com