How can I make the ls command show a file's full path instead of just its filename? With all its options, there must be a way, right?

link|improve this question

67% accept rate
feedback

3 Answers

up vote 2 down vote accepted

Here is one option for doing this.

ls -d $PWD/*
link|improve this answer
feedback

This is another way for individual files:

readlink -e filename
link|improve this answer
Combining with find: find . -exec readlink -e '{}' \; – MikeyB Mar 2 '11 at 17:49
feedback

I usually use find:

find /dir -type -f -name "*"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.