Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # create directories
  2. mkdir -p /tmp/test_day && cd $_ && mkdir -p today yesterday before_yesterday && cd -
  3.  
  4. # in linux change modification time
  5. touch -d '-2 days' /tmp/test_day/before_yesterday
  6. touch -d '-1 day' /tmp/test_day/yesterday
  7. touch /tmp/test_day/today
  8.  
  9. # find directories with modification time older then 24 hours
  10. find /tmp/test_day -mindepth 1 -mtime +0
  11.  
  12. # -and -a -or -o
  13. find /tmp/test_day -mindepth 1 -mtime -4 -a -mtime +1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement