The lab in this chapter has students creating a PostScript file to print a man page. I think the chapter misses the opportunity to have students demonstrate the ability to find information in man pages. I've created two retrieval practice exercises to address this.
Searching for a man page
You have a file in your home directory named secrets which you want to delete with no possible way of recovering the data. You heard that there is a program that will overwrite a file to hide its contents, and optionally delete it. Search the man pages to find the program. Show the command exactly as you would type it on the command line to overwrite and delete the file.
Solution
The solution is to use man -k overwrite. One of the possible programs will be shred. Reading the man page shows the -u option will delete the file.
$ shred -u secrets
Command Options
1. Log into workstation
2. From your home directory use mkdir to create ~/Documents/MyStuff/MoreStuff.
3. The command will fail because the parent directories do not exist.
4. Use the man page for mkdir to research the problem and add the appropriate options to create the parent directories and display a message that they were created.
5. Submit a screenshot of the output of the mkdir command using the options you selected.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.