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.


15 visits (2 today, 4 this week, 15 this month, 15 this year)
Uptime: 20:06:50 up 2 days, 4:10, 2 users, load average: 0.01, 0.02, 0.00
216.73.217.6 GET from server z.lamurakami.com

Monday, June 22, 2026 @ 8:06:50 PM
z.ServerAdmin@lamurakami.com