How unix copies the current path directly in the terminal?

94 1

How unix copies the current path directly in the terminal? I'm in the current file path for example: Cd/usr/local/src, then how I copy the current path. I'm now using the pwd command and then copy it with the mouse, now I can copy the path directly. ...

4 Answers

105 4

I found a way:

p=`pwd`

  • Assign the current path to"p""
cd.. 

  • Go back to directory name
cd $p

And # is back to the last directory.
I don't know if there's more.
59 0
...