Terminal - Current Directory Symbol [Closed]

Is there a symbol for the current directory?

For example instead of type the full path name for the current directory, e.g.:

cp /User/Name/f1/f2/ /User/Name/f3/f4/f5

where /User/Name/f1/f2/ is the current directory.

Is there any symbol that acts as pwd?

Simply a . will act as the current working directory in bash

In this example you give

cp . /User/Name/f3/f4/f5

To note: this will not work, cp will need the -r parameter for copying directories

cp -r . /User/Name/f3/f4/f5

The current working directory can also be fetched with the pwd command, used as $(pwd) instead of . in this command

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest