Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create directories
- mkdir -p /tmp/test_day && cd $_ && mkdir -p today yesterday before_yesterday && cd -
- # in linux change modification time
- touch -d '-2 days' /tmp/test_day/before_yesterday
- touch -d '-1 day' /tmp/test_day/yesterday
- touch /tmp/test_day/today
- # find directories with modification time older then 24 hours
- find /tmp/test_day -mindepth 1 -mtime +0
- # -and -a -or -o
- find /tmp/test_day -mindepth 1 -mtime -4 -a -mtime +1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement