Get url of current path in Terminal SSH
I am having trouble using git on my own server. I am having trouble where I add the origin path (remote add) as I am entering the wrong url. By finding out the correct path to the .gi开发者_高级运维t repository on my server, I should be able to enter that into remote add
and it should now find the git repository. So, what I would like to know is how can you get the current path of the folder you are browsing via SSH?
Thanks
If the remote host is Unix-like, type pwd
.
I use this bash script to copy the path to any directory to clipboard
readlink.sh
readlink -f $1 | xclip -selection clipboard
Usage:
readlink.sh ./
# current directoryreadlink.sh /path/to/somewhere/over/the/rainbow
精彩评论