LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Search only the last 24 hours files (https://www.linuxquestions.org/questions/linux-general-1/search-only-the-last-24-hours-files-434794/)

davholla 04-13-2006 08:57 AM

Search only the last 24 hours files
 
How do I modify the ls command so that it only returns files created in the last 24 hours ?

macemoneta 04-13-2006 09:09 AM

You can use find. For example:

touch -t 04130200 datefile
find /path/ -newer datefile -print
rm datefile

This will find files created after 04/13 at 02:00.


All times are GMT -5. The time now is 04:37 PM.