How can I list files with their absolute path in linux?

Posted by Jiltin     26 June, 2009    2,383 views   

Very interesting one for me whenever I use the ultra edit, I need to provide a complete linux path file name to it. Whenever I list files in unix I always get the file in current directory. Here is the method I use to find the complete file path to process.

[bcompiler]# ls -ltr
-rwxr-xr-x 1 root root 206 Jul 22 2002 Makefile.in.old
-rw-r–r– 1 root root 0 Jul 22 2002 EXPERIMENTAL
-rwxr-xr-x 1 root root 333 Jul 22 2002 config.m4.old

However, I want to get the complete path or absolute path of a file. How can I get it?

I want to generate recursive file listings with full paths

/usr/local/bin/bcompiler/README

but as far as I can see both ls and find only give relative path listings

./bcompiler/README (from the folder bin)

It seems like an obvious requirement but I can’t see anything in the find or ls man pages.

Simple trick can get you… use find `pwd` like here.

[bcompiler]# find `pwd` -name README
/usr/local/bin/bcompiler/README

Did you look for such details? if so, feedback please…

Following Google Searches Lead To This Post:
list files recursively linux show path

Following Google Searches Lead To This Post: linux “complete path” ls

Post to Twitter  Post to Delicious  Post to Digg    Post to StumbleUpon

Categories : Scripts Unix Tags : ,

Comments

No comments yet.


Leave a comment

(required)

(required)