findコマンドのctime 1とctime +1の違い


17

次のコマンドを実行すると:

find . -name "*.jar" -type f -ctime +1

私が実行した場合、結果は返されません:

find . -name "*.jar" -type f -ctime 1

結果が得られます。

回答:


23

これは、ディレクトリ内のすべてのjarファイルのステータスが48時間以内に変更されたことを意味します。

詳細な説明

findマニュアルページによると、

-ctime n
    File's status was last changed n*24 hours ago.

そして...

When find figures out how many 24-hour periods ago the file was 
last accessed, any fractional part is ignored, so to match -atime +1, 
a file has to have been accessed at least two days ago.

そして他の場所...

+n for greater than n

したがって-ctime +1、ファイルのステータスは少なくとも48時間前に変更されている必要があります。

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.