Linux command to check new files in file system

前端 未结 4 2001
栀梦
栀梦 2021-01-31 10:08

We have linux machine we would like to check what new files have been added between a certain date range.

I only have SSH access to this box and it\'s openSUSE 11.1

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-31 10:48

    You can try one of these:

    find -newerct "1 Aug 2013" ! -newerct "1 Sep 2013" -ls
    
    find . -mtime $(date +%s -d"Jan 1, 2013 23:59:59") -mtime $(date +%s -d"Jan 2, 2016 23:59:59")
    
    find /media/WD/backup/osool/olddata/ -newermt 20120101T1200 -not -newermt 20130101T1400
    
    find . -mtime +1 -mtime -3
    find . -mtime +1 -mtime -3 > files_from_yesterday.txt 2>&1
    find . -mtime +1 -mtime -3 -ls > files_from_yesterday.txt 2>&1
    
    touch -t 200506011200 first
    touch -t 200507121200 last
    find / -newer first ! -newer last
    
    #!/bin/bash
    for i in `find Your_Mail_Dir/ -newermt "2011-01-01" ! -newermt "2011-12-31"`; do
        mv $i /moved_emails_dir/
    

    Hope this helps.

提交回复
热议问题