Reputation: 13
I am using ls -t | head -n1
(in the OS X bash shell) to return the last modified file in my working directory. In some cases, a subdirectory of the working file has the most recently modified file in it, so the command returns the name of that subdirectory. How do I write the command to exclude subdirectories?
Upvotes: 1
Views: 45