MAX 21 Points
(3 points)
Write a script that prints every user on your system using more than N megabytes of disk space. 'N' is supplied on the command line. Remember that command line arguments are things like $1, $2 and $@.
Example:
hogs 20
(3 points)
Write a script that prints all processes using more than 30 megabytes of RAM or more than 20% of the CPU.
(3 points)
For each file in the current working directory, copy it to a folder called ~/backups. Don’t do directories. Don’t do any file such that the corresponding file in ~/backups is newer than the source file.
(8
points)
Write
me a script that takes a directory to start in. It should print
all files that meet at least on criteria, and tell me why. It
can list the same file more than once if need be.
Empty files (exactly zero bytes)
Empty directories (no contents in the directory)
Last used more than 1 year
Files owned by no valid user
Files owned by root
.bashrc with world or group write permission
It's bigger than 10M
Files
that no one can read (hint: This is not -readable)
Startup Stuff (4 points)
Run some unique command on start up
Change your prompt to something no one else in the room has that's cool
Change your PATH to include something new and useful
Add a useful unique alias.