In a relative path, what’s the difference between ~/directory/subdirectory and ./directory/subdirectory?
In a relative path, what’s the difference between ~/directory/subdirectory and ./directory/subdirectory ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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/subdirectoryrefers tosubdirectoryfolder insidedirectoryfolder, inside your home folder../directory/subdirectoryrefers tosubdirectoryfolder insidedirectoryfolder, inside current execution folder.