List files recursively in linux with path relative to the current directory

Posted by Darryl Hein on Stack Overflow See other posts from Stack Overflow or by Darryl Hein
Published on 2008-10-29T03:28:06Z Indexed on 2010/04/28 0:53 UTC
Read the original article Hit count: 302

Filed under:
|
|
|

This is similar to this question, but I want to include the path relative to the current directory in unix. If can do the following:

ls -LR | grep .txt

But it doesn't include the full paths. For example, I have the follow dir structure:

test1/file.txt
test2/file1.txt
test2/file2.txt

The code above will return:

file.txt
file1.txt
file2.txt

How can I get it to include the paths relative to the current directory using standard nix commands?

© Stack Overflow or respective owner

Related posts about unix

Related posts about ls