As such, you may wish to dismount your connected servers and eject your CDs and DVDs before using this command. Also keep in mind that since you’re searching the root directory of your machine, this will also search any mounted file servers and any CDs or DVDs that you have in your Mac (because they’re all listed in /Volumes).
You’ll need to supply your password (due to the use of sudo ), and this version will take a few minutes to run-it’s searching every file on your machine to find the matches. Sudo find / -type f -ctime 0 > ~/Desktop/modfiles.txt Use the following commands to get a list of every file that has been changed on your system within the last 24 hours, with the output sent to a file on your desktop: How about a more complex example? Assume you’ve just installed Gargantua App (version 2, now a Universal Binary), and you’re curious to see what files it may have created or changed during the installation. I could look for modified date instead of created date.
I could search for only jpeg files, or I could search for movie files, etc. Here is an example to search my Mac for all images created in December 2015 (and it produced the results instantaneously, too). That is, you won’t find all files that are “at least” 24 hours old, you’ll find only those files that are exactly (with rounding) 24 hours old. Press command-F and add the relevant criteria. You can also click Show All in Finder at the top of the results to see the location of the files in a new Finder window. Simply click a file or folder to open it. The search results will appear as you type. In case I wasn’t completely clear with this example, ctime works via matching, not as a limit. To do this, click the Spotlight icon in the top-right corner of the screen, then type the file name or keywords in the search box. Obviously, you could easily change the command to show files that have been changed 24 hours ago ( ctime -1 ) or 48 hours ago ( ctime -2 )-or any other full-day increment you’d like to use. | more: This just sends the output to the Unix paging system, so you can read it one screen at a time.-ctime -0: Limits the modification time to the latest 24-hour period (rounded).-type f: Finds only files, not directories, symbolic links, or other special Unix file types.To start find in the current directory, you would use find. find ~/Documents: Runs the Unix find command, starting in the Documents folder, and then reading all other directories at or below that level.The output should be a list of all files that have changed in your Documents folder within the last 24 hours. Find ~/Documents -type f -ctime -0 | more