Commandline shortcut for current directory similar to ~ for home directory?

Posted by NES on Ask Ubuntu See other posts from Ask Ubuntu or by NES
Published on 2011-02-11T13:49:42Z Indexed on 2011/02/11 15:33 UTC
Read the original article Hit count: 386

Filed under:
|

When i use the cp or move command in a terminal window, i'm currently with bash in a certain folder like this.

NES@server:~/Desktop/dir1$

And now i wanna copy a file from here ~/anotherdir/dir2 into the current chosen folder in bash (dir1) i would use the command

cp ~/anotherdir/dir2/file ~/Desktop/dir1

does a shortcut string exist to refer to the current chosen directory? So that in this example i don't have to provide the full path to the target dir, but the command knows it should use the current chosen directory in bash? i.e. as ~ stands for the home directory?

© Ask Ubuntu or respective owner

Related posts about shortcut

Related posts about commandline