How to find the files that are created in the last hour in unix

前端 未结 6 1268
栀梦
栀梦 2021-01-29 18:36

How to find the files that are created in the last hour in unix

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 19:28

    check out this link and then help yourself out.

    the basic code is

    #create a temp. file
    echo "hi " >  t.tmp
    # set the file time to 2 hours ago
    touch -t 200405121120  t.tmp 
    # then check for files
    find /admin//dump -type f  -newer t.tmp -print -exec ls -lt {} \; | pg
    

提交回复
热议问题