Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run find, it outputs relative (./-based) file names, but I need full absolute (/-based) names.

share|improve this question
up vote 10 down vote accepted

You should call find with absolute directories' names, for example:

find "$PWD"/ -iname '*.txt'
share|improve this answer
I'd advise quoting "$PWD" just in case. – jw013 Mar 27 '12 at 21:11
@jw013: oh, right. – enzotib Mar 28 '12 at 7:17

@enzotib's answer is probably better but I use

find "`pwd`" -iname '*.txt'

because the lowercase letters and ` are easier for me to type.

share|improve this answer
Even so you should quote that: "`pwd`". Try it: mkdir '/tmp/foo bar' && cd !#:1 && find `pwd`; rmdir !#:1. – janmoesen Mar 28 '12 at 11:47

Your Answer


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.