How do I find all the files that were created today in Unix/Linux?

后端 未结 11 665
梦谈多话
梦谈多话 2020-12-24 00:21

How do I find all the files that were create only today and not in 24 hour period in unix/linux

11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 00:57

    To find all files that are modified today only (since start of day only, i.e. 12 am), in current directory and its sub-directories:

    touch -t `date +%m%d0000` /tmp/$$
    find . -type f -newer /tmp/$$
    rm /tmp/$$
    

    Source

提交回复
热议问题