chmod без изменения состояния (atime) файла

Используйте указанные ниже параметры с меньше . Он отключит перенос слов и сохранит цвета текста, если он указан.

меньше -SR + F имя_файла

1
28.02.2019, 15:01
1 ответ

В вашем примере был изменен только каталог. Вы можете отключить atime, добавивnodiratime(только каталоги )илиnoatime(файлы и каталоги, включаяnodiratime)в параметры монтирования в /etc/fstab. Тогда должно измениться только ctime.

По умолчанию в ядре используется значение relatime, если оно не переопределено и отображается при выполнении команды mount.

крепление (8)

 relatime
              Update  inode  access  times relative to modify or change time.  Access time is only
              updated if the previous access time was earlier than the current  modify  or  change
              time.   (Similar  to  noatime,  but it doesn't break mutt or other applications that
              need to know if a file has been read since the last time it was modified.)

              Since Linux 2.6.30, the kernel defaults to the  behavior  provided  by  this  option
              (unless  noatime  was  specified),  and the strictatime option is required to obtain
              traditional semantics.  In addition, since Linux 2.6.30, the file's last access time
              is always updated if it is more than 1 day old.

Кстати. ваш chmod здесь не работает. Вы имели в виду chmod -R u=rwx,g=rwx,o=rwx test?

2
27.01.2020, 23:30

Теги

Похожие вопросы