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.


22 visits (1 today, 2 this week, 15 this month, 22 this year)
Uptime: 05:53:55 up 5 days, 23:26, 3 users, load average: 0.57, 0.14, 0.05
216.73.216.7 GET from server z.lamurakami.com

Monday, August 17, 2026 @ 5:53:55 AM
z.ServerAdmin@lamurakami.com