I want to list the contents of one or more directories recursively with complete pathnames to all files. Say that I have the following files
/home/name/one/directory/foo.txt
/home/name/another/directory/bar.txt
/home/name/antoher/directory/second bar.txt
What I want is to be able to list the contents of both directories with a long listing (-l) and then manipulate that listing with sort or grep or whatever. The closest I've gotten by searching the web is:
- Code: Select all
ls -ld $(find /home/name/one/directory/) $(find /home/name/antoher/directory/)
The only problem I've found so far is that it doesn't work with filenames with spaces.
Last edited by
Per on Jul 18th, '13, 13:22, edited 1 time in total.