← October 2022 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
My Blog Links
Recent Entries
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
Categories
Never add '.' to your path :(
So today was bad ... I was working in an Ubuntu environment and I was sick of typing the prefix "./" in front of my program name to run it in the terminal. I decided that I would add "." to my end of my path, that way all system calls still had precedence and I didn't have to type the annoying "./" before my program name to run it.
Everything was perfect, I was living it up and saving valuable key strokes until unix took revenge. I decided to run the "
rm" program like so
I needed to recursively remove all files from a directory, but since the "." was included in my path. "rm" also looked at the ".." folder, which then started removing files from all other places of my home directory
Luckily I had backed up my home folder not too long ago, but let this be a valuable lesson to all - don't include "." in your path.
Everything was perfect, I was living it up and saving valuable key strokes until unix took revenge. I decided to run the "
rm" program like so
rm -r *.
I needed to recursively remove all files from a directory, but since the "." was included in my path. "rm" also looked at the ".." folder, which then started removing files from all other places of my home directory



|