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,200 points
9 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can use readlink command:

readlink -f filename.txt

for more information click here.

answered Mar 15 by DareDev
• 6,520 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 6 days ago in Linux Administration by Upasana
• 7,560 points
6 views
0 votes
1 answer

How to find path of software installed in Linux?

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

answered 2 days ago in Linux Administration by Rishi
13 views
0 votes
1 answer
0 votes
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
• 65,840 points
52 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,200 points
47 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,000 points
38 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,000 points
11 views
0 votes
1 answer

set permanent path to Linux

Add it to your ~/.profile or ~/.bashrc file: export PATH="$PATH:/path/to/dir" You may ...READ MORE

answered Feb 27 in Linux Administration by DareDev
• 6,520 points
15 views
0 votes
1 answer

Counting lines in a file/doc.

you can do this by using word ...READ MORE

answered Mar 5 in Linux Administration by DareDev
• 6,520 points
16 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.