In a relative path, what's the difference between ~/directory/subdirectory and ./directory/subdirectory?
2 Answers
In Linux, ~ is your home directory, while . is the current directory, so those pathes are the same when you are in your home directory (since . is ~), but not in other cases.
~/directory/subdirectory refers to subdirectory folder inside directory folder, inside your home folder.
./directory/subdirectory refers to subdirectory folder inside directory folder, inside current execution folder.
Comments
~/directory/subdirectory for any particular user, is an absolute path instead. It referes to "directory/subdirectory" inside the user's home directory.
./directory/subdirectory is a relative path. It referes to "directory/subdirectory" inside the current directory (output of pwd command).
~/work in Windows? Are you using Cygwin? (not mentioning the/...)File.seperator. IIRC, that is.