O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Exercises

9.What lines do you need to change in the Bourne Again Shell script command_menu (page 654) to make it a TC Shell script? Make the changes and verify that it works.
10.Users often find rm (and even rm –i) too unforgiving because it removes files irrevocably. Create an alias named delete that moves files specified by its argument(s) into the ~/.trash directory. Create a second alias, named undelete, that moves a file from the ~/.trash directory into the working directory. Finally, put the following line in your .logout file to remove any files that you deleted during the login session:
/bin/rm -f $HOME/.trash/* >& /dev/null 

Explain what could be different if the following line were put in your .logout file instead:

 rm $HOME/.trash/* ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required