Почему команда find не работает?

Почему такая команда
find . -type f -ctime +30 -delete
Не удаляет нужные файлы
Пробовал mtime и ctime

Вывод ls -lc
root@moscow-battle:~/backup_mysql/30-04-2021# ls -lc
total 12564
-rw-r--r-- 1 root root 1829972 Apr 30 17:00 17-00-01.tar.bz2
-rw-r--r-- 1 root root 1832426 Apr 30 18:00 18-00-01.tar.bz2
-rw-r--r-- 1 root root 1832644 Apr 30 19:00 19-00-01.tar.bz2
-rw-r--r-- 1 root root 1836240 Apr 30 20:00 20-00-02.tar.bz2
-rw-r--r-- 1 root root 1838100 Apr 30 21:00 21-00-01.tar.bz2
-rw-r--r-- 1 root root 1839485 Apr 30 22:00 22-00-01.tar.bz2
-rw-r--r-- 1 root root 1840507 Apr 30 23:00 23-00-01.tar.bz
  • Вопрос задан
  • 152 просмотра
Решения вопроса 1
hint000
@hint000
у админа три руки
Потому что надо -ctime +29

$ man find
...
-atime n
File was last accessed n*24 hours ago. When find figures out how many 24-hour periods ago the file was last ac‐
cessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days
ago.
...
-ctime n
File's status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the
interpretation of file status change times.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы