# How to Find the Latest Version of a File on OSX Using mdfind

DevFeed: [How to Find the Latest Version of a File on OSX Using mdfind](<https://devfeed.tech/articles/how-to-find-the-latest-version-of-a-file-on-osx-using-mdfind-28210.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/osx/2020/04/26/how-to-find-the-latest-version-of-a-file-on-osx-using-mdfind.html>)

Author: Fuzzygroup

Published: 2020-04-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [osx](<https://devfeed.tech/topics/osx.md>), [ls](<https://devfeed.tech/topics/ls.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [library](<https://devfeed.tech/tags/library.md>), [ls](<https://devfeed.tech/tags/ls.md>), [mdfind](<https://devfeed.tech/tags/mdfind.md>), [osx](<https://devfeed.tech/tags/osx.md>)

## AI overview

A brief macOS how-to showing how to use mdfind, xargs, and ls -t to locate the latest version of a file, illustrated with a library file.

## Source excerpt

"""< HEAD ======= 4cbbc577cf49ce99e5aaf8b73f0396e50651d3a9 I recently wanted to find the latest version of a library I wrote and I started by using mdfind: mdfind -name select_page_parser.rb I then added xargs per this article: mdfind -name select_page_parser.rb -0 | xargs -0 ls -t