Answer the question
In order to leave comments, you need to log in
Bash: determine which directory is newest
Task: there is a directory where a new subdirectory is uploaded every day, it is necessary to determine by a script which directory is new, so that files can be copied from it by the same script. There is no way to bind to the directory name, so you can only work with the date the directory was created
Answer the question
In order to leave comments, you need to log in
for a folder, you can get the last modified date
stat --printf=%z path/to/folder
%w creation date, but not stored for all fs.
you can store a file with the creation date of the folder in each folder if the date of the change does not solve the problem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question