0

I'm looking for a way to search certain files named "XYHello.pdf" or "BDHello.pdf" so basically "*Hello.pdf" in a directory with subfolder and export the found files including path to the file in a text file.

So that at the end I have a list with all found files including the paths in a list. I spontaneously thought about Linux Command find.

find . -type f -iname "*Hello.pdf" 

But the problem is i need the full path to the file in a list.

jww
  • 97,681
  • 90
  • 411
  • 885
M. Antony
  • 161
  • 2
  • 3
  • 12
  • 1
    I'm voting to close this question as off-topic because it's not a programming question, but about the use of a linux standard tool. As such it's best off at https://unix.stackexchange.com – tink Nov 30 '18 at 09:18
  • that said: if you replace your `.` with `$PWD` `find` will give you the full path ;) – tink Nov 30 '18 at 09:19
  • Please allow us to Google that for you: [find file show full path](https://www.google.com/search?q=find+file+show+full+path). And then the first hit: [How can I list files with their absolute path in linux?](https://stackoverflow.com/q/246215/608639) – jww Nov 30 '18 at 11:59

1 Answers1

1
find $PWD -type f -iname "*Hello.pdf" 

or

find . -type f -iname "*Hello.pdf" -exec realpath {} \;
Arash
  • 148
  • 1
  • 9
  • For _MS-Windows_, the **answer** is _here_--[How to Export File Search Results to Excel](https://smallbusiness.chron.com/export-file-search-results-excel-40552.html) – Jenna Leaf Dec 14 '20 at 21:08