Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

Is there any other way I can print a full path of file.txt ?

file.txt = /nfs/an/disks/jj/home/dir/file.txt

The <command>

dir> <command> file.txt  

It prints

/nfs/an/disks/jj/home/dir/file.txt

 

1 Answer

0 votes
by (36.8k points)

Use the readlink:

readlink -f file.txt

Come and join Linux training to gain great knowledge. 

Do check out the video below

Related questions

0 votes
1 answer
asked Nov 28, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
asked Dec 15, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

Browse Categories

...