Throughout the years I've been using ./
in front of absolute paths more and more.
For example:
mv ./file /target/
rm ./something/else
# compared to
mv file /target/
rm something/else
I've seen it in more places around the web, which is probably why I adapted to using it. I can't seem to understand why this is done though, and have been wondering for a while.
Maybe it's a bad habit originating from calling local binaries directly: ./a.out
Is the ./
obsolete in the shell example above? Is there any reason to use ./
in some cases? Does using it possibly make paths more explicit?