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?

user191960
  • 1,941
  • 5
  • 20
  • 24

2 Answers2

4
find $(pwd) -type f -print

or

find $(pwd) -type f -ls
Aoife
  • 1,736
  • 14
  • 12
0

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
  • 8,320
  • 27
  • 30