your door often opens ~ ~ ~ Lao Wang Please come in ~ ~ (be cautious of the current directory. Join path)
Often hear people say don't put. (current directory) to join the path, in the end why, I think of many times also surf the internet for half a day, and then did not have any eggs with
The final thought, muddying ~ ~ Think of such an example, at least can see the. Directory join path will be what kind of fate !!!
So ~ ~ Speak:
First, the simulation will, the directory into the path
This is the variable of the original path.
2. So now I will. Directory will be entered into path
Keep your eyes wide open @@:Be sure to put the. Directory first, because a command is searched from the path in the front, and if you can't find it, go to the back.
Second, suddenly there is a hacker chicken blood surging want to engage in things, take a look at how he
1. He used an ordinary user to create a script called "Vi" in his home directory.
The script content is simple is to delete a file: (If you change to delete the root directory, the consequences of their own to go to it)
Script content:
2. At this time root user whim, want to go to George her home VI This command to see other files
3. Now Root has entered the George home directory.
Finally look at the root directory of the test file is still there:
If you don't understand it: Add the. Directory to path, wait for the old king next door ~~~~~~~~~~
Finally, welcome to the public: Linux OPS rookie Tour
Shell security ——— Be wary of the current directory. Join path~~~ ~ The old king came knocking at the door