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.


14 visits (2 today, 14 this week, 14 this month, 14 this year)
Uptime: 14:23:42 up 11 days, 22:42, 2 users, load average: 0.08, 0.02, 0.00
216.73.216.166 GET from server z.lamurakami.com

Friday, January 23, 2026 @ 2:23:42 PM
z.ServerAdmin@lamurakami.com