TrapsFor now, we'll add just one major trap when using the command line. Bash is very unforgiving of errors. If you want to remove all the files in the current directory and below, you can could do this (but don't):
This tells the rm command to delete all files in the current directory, recursively, and force it (don't ask). But what if you were not in the directory you thought you were in? If you were running as the superuser (root) you could delete all the files on your hard drive!
If you meant to delete the file "ubuntu Sax.ogg", you did not. Instead, you would have deleted a file named "ubuntu" and another named "Sax.ogg" if they both existed. That's one reason we renamed it. We will add more traps later.
|
This page is This page rendered by CodeIgniter in 0.0513 seconds. |