Welcome, Guest
Username Password: Remember me

shell script to find all new files added
(1 viewing) (1) Guest
Shell Script
  • Page:
  • 1

TOPIC: shell script to find all new files added

shell script to find all new files added 1 year, 8 months ago #349

  • scmuser
  • OFFLINE
  • Gold Boarder
  • scm master
  • Posts: 237
  • Points: 3429
  • Karma: 0
  • Honor Medal 2009
Hi,

i am looking for a shell script to find all new files added or modified after a certain date & Time??

Any help?

Re:shell script to find all new files added 1 year, 7 months ago #369

  • praveen
  • OFFLINE
  • Moderator
  • Posts: 43
  • Points: 3562
  • Karma: 0
  • Honor Medal 2009
This should solve the problem

find . -type f -mtime -7 -print



Here,
* -mmin n (modification time in minutes)
* -mtime n (modification time in days)
* -newer file (modification time newer than modification time of file)
* -daystart (adjust start time from current time to start of day)
* Plus alternatives for access time and 'change' or 'create' time.



Or thinkikng


touch can be used
  • Page:
  • 1
Time to create page: 0.73 seconds

     
    
Home Forum