Как я могу отображать файлы, которые были написаны на определенную дату

Проблема с начальным ответом, внутренний набор двойных кавычек должен быть экранирован

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {\"/usr/sbin/dpkg-preconfigure --apt || true\";};' >> /etc/apt/apt.conf.d/70debconf"

Я могу подтвердить, что /etc/apt/apt.conf.d/70debconf существует на обоих моих Ubuntu 16.04 и Ubuntu 17.10. Содержимое этого файла в моем ящике Ubuntu 16.04:

// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
4
задан 30 March 2018 в 10:01

3 ответа

Вы найдете файлы, измененные между диапазоном дат, используя команду find команды -newermt команды, например,

find path/to/folder/ -name '*.pth.tar' -newermt '23 Feb 2018' ! -newermt '01 Mar 2018'

! является оператором логического отрицания. Из man find:

   -newerXY reference
          Succeeds  if  timestamp  X of the file being considered is newer
          than timestamp Y of the file reference.   The letters  X  and  Y
          can be any of the following letters:

          a   The access time of the file reference
          B   The birth time of the file reference
          c   The inode status change time of reference
          m   The modification time of the file reference
          t   reference is interpreted directly as a time
6
ответ дан 22 May 2018 в 11:43

Вы найдете файлы, измененные между диапазоном дат, используя команду find команды -newermt команды, например,

find path/to/folder/ -name '*.pth.tar' -newermt '23 Feb 2018' ! -newermt '01 Mar 2018'

! является оператором логического отрицания. Из man find:

-newerXY reference Succeeds if timestamp X of the file being considered is newer than timestamp Y of the file reference. The letters X and Y can be any of the following letters: a The access time of the file reference B The birth time of the file reference c The inode status change time of reference m The modification time of the file reference t reference is interpreted directly as a time
6
ответ дан 17 July 2018 в 17:52

Вы найдете файлы, измененные между диапазоном дат, используя команду find команды -newermt команды, например,

find path/to/folder/ -name '*.pth.tar' -newermt '23 Feb 2018' ! -newermt '01 Mar 2018'

! является оператором логического отрицания. Из man find:

-newerXY reference Succeeds if timestamp X of the file being considered is newer than timestamp Y of the file reference. The letters X and Y can be any of the following letters: a The access time of the file reference B The birth time of the file reference c The inode status change time of reference m The modification time of the file reference t reference is interpreted directly as a time
6
ответ дан 23 July 2018 в 18:43

Другие вопросы по тегам:

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