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 in Linux Administration by Atul
• 10,240 points
28 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 by DareDev
• 6,810 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 in Linux Administration by Upasana
• 8,530 points
38 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 in Linux Administration by Rishi
118 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 in Linux Administration by Omkar
• 67,660 points
110 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,240 points
91 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 in Linux Administration by ajs3033
• 7,280 points
91 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 in Linux Administration by ajs3033
• 7,280 points
56 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 in Linux Administration by DareDev
• 6,810 points
713 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 in Linux Administration by DareDev
• 6,810 points
48 views