copy the file path in the terminal

Surely there is a way, working in the terminal, being in a specific folder, how to copy the path to this file?

Applicability: save the file paths to a separate file.

How I see it:

$ copy file path > FilesPaths.txt

Author: vovs03, 2018-03-23

1 answers

Try pwd (Print Working Directory):

> pwd > filename.txt

No, it's best like this (Path and file, text.txt will reset to zero):

> readlink -e filename > text.txt

I almost forgot, add the entry like this:

> readlink -e filename >> text.txt
 2
Author: AlexGlebe, 2018-03-24 16:41:58