views:

210

answers:

2

I've currently got:

ls -1 $(pwd)/*

Gives me all the files in a directory with absolute paths - but formats it with the directory at the start of each list of files.

Is there a way just to get a list of files in a directory recursively (absolute paths) - excluding the directory/sub-directories themselves?

+4  A: 
find $(pwd) -type f -print

or

find $(pwd) -type f -ls
Uh Clem
find $(pwd) -type f
Murali VP
If one has files with spaces you'll need to edit the result of this command - space -> _.
A: 

If you are feeding it into something else, you might want -print0 (to handle filenames with spaces).

E.g.: find . -type f -print0 | xargs --null --no-run-if-empty grep

Mr.Ree