Last active
September 6, 2019 06:57
-
-
Save vladpurga/bd1c92004ea5c67da18b2509a9e22487 to your computer and use it in GitHub Desktop.
Revisions
-
vladpurga revised this gist
Sep 6, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,7 @@ 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 -
vladpurga created this gist
Sep 5, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # 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 /tmp/test_day