トップ «前の日記(2019-08-05(Mon)) 最新 次の日記(2019-08-10(Sat))» 編集

屑俺日記

僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。


2019-08-06(Tue) 曇っているかも

find -and

前に書いたかもしれないが、まぁいいか。

$ for x in `seq 9`; do touch -d 2019070${x} 2019070${x}.txt; done
 
$ ls -l
合計 0
-rw-rw-r-- 1 user group 0  7月  1 00:00 20190701.txt
-rw-rw-r-- 1 user group 0  7月  2 00:00 20190702.txt
-rw-rw-r-- 1 user group 0  7月  3 00:00 20190703.txt
-rw-rw-r-- 1 user group 0  7月  4 00:00 20190704.txt
-rw-rw-r-- 1 user group 0  7月  5 00:00 20190705.txt
-rw-rw-r-- 1 user group 0  7月  6 00:00 20190706.txt
-rw-rw-r-- 1 user group 0  7月  7 00:00 20190707.txt
-rw-rw-r-- 1 user group 0  7月  8 00:00 20190708.txt
-rw-rw-r-- 1 user group 0  7月  9 00:00 20190709.txt
$ find . -type f  -mtime -33 -exec ls -alFh {} \; | sort
-rw-rw-r-- 1 user group 0  7月  5 00:00 ./20190705.txt
-rw-rw-r-- 1 user group 0  7月  6 00:00 ./20190706.txt
-rw-rw-r-- 1 user group 0  7月  7 00:00 ./20190707.txt
-rw-rw-r-- 1 user group 0  7月  8 00:00 ./20190708.txt
-rw-rw-r-- 1 user group 0  7月  9 00:00 ./20190709.txt
$  find . -type f -mtime +30 -exec ls -alFh {} \; | sort
-rw-rw-r-- 1 user group 0  7月  1 00:00 ./20190701.txt
-rw-rw-r-- 1 user group 0  7月  2 00:00 ./20190702.txt
-rw-rw-r-- 1 user group 0  7月  3 00:00 ./20190703.txt
-rw-rw-r-- 1 user group 0  7月  4 00:00 ./20190704.txt
-rw-rw-r-- 1 user group 0  7月  5 00:00 ./20190705.txt
-rw-rw-r-- 1 user group 0  7月  6 00:00 ./20190706.txt
$ find . -type f -mtime +30 -and -mtime -33 -exec ls -alFh {} \; | sort
-rw-rw-r-- 1 user group 0  7月  5 00:00 ./20190705.txt
-rw-rw-r-- 1 user group 0  7月  6 00:00 ./20190706.txt

リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。

index.htmlは ここから。