Output of full file path
Given a file in a directory, is there an easy way to copy the full file path so it can be pasted elsewhere ? From a console ? From a file manager ?
|
There are at least two applications that let you interface with the x selection mechanism: xsel and xclip.
To get the full and actual path of a file, try readlink. e.g. to copy the full path of a file to the selection for (middle-click) pasting: Code:
readlink -f filename | xsel -i |
Using thunar here, I tried highlighting and Ctrl+c and my clipboard now contains this string
file:///home/jj/Documents/ftpcron.out YMMV, but me thinks it may be possible in another DE. |
Quote:
I use to have these installed and use[d] 'em here and there. They work. ;) |
How about:
Code:
echo $(pwd)/filename |
All times are GMT -5. The time now is 10:47 PM. |