Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Here is one option for doing this.

ls -d $PWD/*
share|improve this answer
add comment

This is another way for individual files:

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

I usually use the find command:

find /dir -type f -name "*"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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