Advanced Exercises

10.When you use the redirect output symbol (>) with a command, the shell creates the output file immediately, before the command is executed. Demonstrate that this is true.
11.In experimenting with shell variables, Alex accidentally deletes his PATH variable. He decides that he does not need the PATH variable. Discuss some of the problems he may soon encounter, and explain the reasons for these problems. How could he easily return PATH to its original value?
12.Assume that your permissions allow you to write to a file but not to delete it.
  1. Give a command to empty the file without invoking an editor.

  2. Explain how you might have permission to modify a file that you cannot delete.

13.If you accidentally create a filename with a nonprinting ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.