Finding pat of afile in linux

0 votes

I want to get the whole path of a .txt file:

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

Is there any command that can do the same?

Mar 15, 2019 in Linux Administration by Atul
• 10,250 points
40 views

1 answer to this question.

0 votes

You can use readlink command:

readlink -f filename.txt

for more information click here.

answered Mar 15, 2019 by DareDev
• 6,850 points

Related Questions In Linux Administration

0 votes
1 answer

generating a list of files with their absolute path in Linux

If you find an absolute path to start with, ...READ MORE

answered May 16, 2019 in Linux Administration by Upasana
• 8,570 points
50 views
0 votes
1 answer

How to find path of software installed in Linux?

There are multiple ways to find the ...READ MORE

answered May 19, 2019 in Linux Administration by Rishi
267 views
0 votes
1 answer
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 68,860 points
157 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,250 points
111 views
0 votes
1 answer

how to loop through the content of a file using bash

One of the ways to do it ...READ MORE

answered Feb 15, 2019 in Linux Administration by ajs3033
• 7,280 points
131 views
0 votes
1 answer

redirecting stdout and stderr to file using bash

cmd >>file.txt 2>&1 Bash always executes and redirects ...READ MORE

answered Mar 19, 2019 in Linux Administration by ajs3033
• 7,280 points
96 views
0 votes
1 answer

Setting JAVA_HOME in linux

find /usr/lib/jvm/java-1.x.x-openjdk vim /etc/profile Prepend sudo if logged in ...READ MORE

answered May 24, 2019 in Linux Administration by DareDev
• 6,850 points
740 views
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

answered Jun 20, 2019 in Linux Administration by DareDev
• 6,850 points
70 views