Listing files with absolute paths

posted on 03:05 PM on Wednesday 21 August 2013

In some cases, there is a need to list files with absolute paths rather than just the filename as done by ls. This can be done using the following command:

find pwd -iname '*.txt'

This solution uses find to search for files within the directory provided by pwd which is the current directory. This creates a list of files with absolute paths. You can use any search commands that find support.