Is there ever a benefit to preceding a path with ./ (dot slash)? In most cases, cd ./home is equivalent to cd home (and also cd ./././././home).   Is there ever a case where these two paths would NOT evaluate to the same path? Is there some benefit or drawback to either having or NOT having ./ at the beginning of a folder or file path?What if from inside a program or script, I wanted open a config file, i'm hard coding a file to open, should it be:resource/config.txtOR./resource/config.txtDoes POSIX (or common Unix implementations) give any semantic difference between opening these two paths?
What is the purpose/benefit of putting ./ at the begining of a path?
files;filesystems;filenames
There are at least two reasons to do ./something.You have a program that you want to run. It's inconveniently named something like test or cat or ps. Ordinarily, shells look up program names in directories in the PATHenvironment variable. To execute your test, you have to type ./test, otherwise /usr/bin/test or some such will execute. That can be very confusing.You don't have . in your PATH environment variable because you don't want to accidentally execute a program while you are poking around the file system. Really awful people could leave a script ls in some directory.  The file ls could contain rm -rf $HOME. If your PATH has . in the right place, the awful person might be able to trick you into deleting everything in your home directory. You can certainly put . as the last entry in PATH, but it's possible to devise circumstances where . in PATH causes problems. So, to run a program whose executable resides in the current working directory, you have to prefix its file name with ./.