Answer the question
In order to leave comments, you need to log in
Linux: how to count the total amount of files created between "date" and "date"?
Hello!
There is a directory with a bunch of subdirectories with files. It is necessary to calculate the total volume of all files created from "date" to "date". Tried like this:
find /mnt/directory/ -type f -mtime $(date +%s -d"Feb 1, 2019 00:00:01") -mtime $(date +%s -d"Feb 28, 2019 23:59:59") | du -sb --files0-from=- | awk '{ total += $1} END { print total/1024/1024/1024 }'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question