Как я нахожу все файлы, которые были созданы сегодня в Unix/Linux?

Переопределить метод ToString() в Seats

public override string ToString()
{
   return $"{Name} {SeatNumber}";
}
53
задан Anderson Green 31 August 2013 в 13:03
поделиться

3 ответа

On my Fedora 10 system, with findutils-4.4.0-1.fc10.i386:

find <path> -daystart -ctime 0 -print

The -daystart flag tells it to calculate from the start of today instead of from 24 hours ago.

Note however that this will actually list files created or modified in the last day. find has no options that look at the true creation date of the file.

53
ответ дан 7 November 2019 в 08:31
поделиться

To find all files that are modified today only (since start of day only, i.e. 12 am), in current directory and its sub-directories:

touch -t `date +%m%d0000` /tmp/$$
find . -type f -newer /tmp/$$
rm /tmp/$$

Source

18
ответ дан 7 November 2019 в 08:31
поделиться

You can't. @Alnitak's answer is the best you can do, and will give you all the new files in the time period it's checking for, but -ctime actually checks the modification time of the file's inode (file descriptor), and so will also catch any older files (for example) renamed in the last day.

1
ответ дан 7 November 2019 в 08:31
поделиться
Другие вопросы по тегам:

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