Since this appears first when I search for โfind a new file on the mac shellโ, then I thought I would send it to others to help ...
If you try to find a file only in this directory, thatโs good, but I found that the search works very well, and you can learn something new in this process. However, I had to find the GNU search on my mac to use the line of code that diimdeep posted above.
If you run Homebrew, what do you need if you spend time in the terminal or perhaps one of the alternatives. You can run "brew install findutils" Once this is finished, the code above will work as follows ...
sudo /usr/local/opt/findutils/bin/gfind -type f -printf '%T+ %p\n' | sort -r | head -n 1
Just change the last bit to 10 if you want more. gfine will take the path if you need to specify this. I usually connect to the folder in which I want to start. Find automatically recursively.
source share