3 ms·
Never knew about readlink for files, but I use pwd -P all the time to get the real full path (no symlinks) of the current directory. Really easy to remembe
by kleff 9y ago
Never knew about readlink for files, but I use
pwd -P
all the time to get the real full path (no symlinks) of the current directory. Really easy to remember as well, Print Working Directory.
- kazgul 9y agoThat is not the same use case. You could use this to get the current location of the script being run (not the location where it runs). readlink -f $0