0

In Linux . is used to refer to the current directory, but I need to know instead using pwd what is the current directory via ..

I tried echo $(.) andecho . but doesn't work... any solution to get the same output as pwd but using .?

PlainOldProgrammer
  • 2,725
  • 5
  • 22
  • 30
  • possible duplicate of [How to get full path of a file?](http://stackoverflow.com/questions/5265702/how-to-get-full-path-of-a-file) – Paul May 07 '15 at 17:20
  • 3
    `readlink -f .` works – Paul May 07 '15 at 17:20
  • `pwd` == `.`, it even expands `~` to a fully qualified path, what is your actual question? This is an [X - Y Problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) as stated. –  May 07 '15 at 17:23
  • Doing `echo $(pwd)` works fine, but a requiriment client is not use pwd, I need to use `.` to get the actual dir, but `echo $(.)` doesn't work. My question is how can i do an echo to get the value of `.`? – PlainOldProgrammer May 07 '15 at 17:26
  • you use `echo \`pwd\``, you need to explain the requirement to use `.` it makes no sense technically or otherwise. `.` is just a short cut in the shell to `pwd` –  May 07 '15 at 17:26

1 Answers1

0

readlink -f .

from the comments section

techkuz
  • 3,608
  • 5
  • 34
  • 62