Write a find command that will locate all suid programs on your Sandbox lab OS installation. How many such programs are there? Submit command and numeric answer (not the list of the commands).
2. Consider the problem of finding files that are not useful anymore. What is the option to ls that shows when a file has last been accessed?
Write a find command that lists all regular files (not links, devices, etc.) that have not been accessed in the last three days. How many are there on your Sandbox system? Turn in the command and numeric answer (not the list!).
3. Using the man pages for ls, sort, and head as references, write a one-line script to list the details of the five largest files in the current directory. Do NOT use the -S option to ls, as it is not supported in all versions of ls (e.g., on the suns). Call the script top5. Thus, you can run
% ./top5
and get a result like
-rwxr-xr-x 1 root root 17935 May 9 2005 biggest-file
drwxr-xr-x 2 root root 4096 Jan 22 15:40 tie-for-2a
drwxr-xr-x 2 root root 4096 Dec 10 11:13 tie-for-2b
drwxr-xr-x 2 root root 4096 Dec 10 11:13 tie-for-2c
-rwxr-xr-x 1 root root 2371 Oct 31 2004 5th-largest
Turn in the script (not the list!).
4. If a system is at run level 4 and you run the command telinit 1, what steps will be taken by init? What will be the final result of the command?