1. Write a shell program which renames the current directory with the given file extension to another extension. The playoffs are given on the command line.
Example usage:
$ Rename txt doc
will be renamed:
aaa.txt in aaa.doc
Juhutxt in Juhudoc
...
* To solve, you can also help with sed or awk commands.
*********************************************************
2. Write a shell program to check once every five minutes if the system appears a process and attempt to kill him. Name of the process we give the command line.
Example usage:
$ Kill firefox
computer will be checked every five minutes, if any process running called Firefox, and will try to kill him. Hint: Be sure to use the kill command.
*********************************************************
3. Write a shell program, which checks the file / etc / passwd and displays the number of processes for each user.
Example output: Processes
45 root
peter 2
Exercise 8
* Look at solving the structure of the file / etc / passwd
*********************************************************
4. Write a shell program, which scans all files in the specified directory and its poddirektorijih and displays the current file, (the date of last change).
Example output:
The latest $ / usr / etc
/ Usr / etc / httpd / httpd Oct 25 12:16
*********************************************************
5.Write a shell program that records the daily availability of computers. As the argument we give him a file containing a list of computers, the program should check every five minutes if they are available. In a file (log) to record, if any of the computers are not reachable, the name and the time was not available.
Example usage:
$ Check list_of_computers.txt
prints in the book:
io.something.si not reachable at 15:31
io.somethingsi not reachable at 15:36
io.something.si not available at the 15:41
verbena.something.si not reachable at 15:41
*********************************************************
6. In the shell, write a program that records the density of water users on the system. The program should keep records for every 30 seconds and not more than two days ago. Records should be stored in the files today and yesterday in the format:
Time: 11:50:10 User: 3
Time: 11:50:40 User: 5
*********************************************************
7. Write a shell program, which displays how many and how long (in total) were at some time users logged into the system. Time we give the two dates as a command-line argument.
Example output:
Announces $ 15/10 20/10
Exercise 5 1 day 12:34
demsared 1:12 11 5 days
blazlena 1 0 days, 0:01
...
* Command to look at the property address
*********************************************************
would be nice that someone could help me.. cuz i dont know how to make it...