Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to know how to find the files that are last changed under a directory and its subdirectories. ls -lt doesnt work, because if a file is changed and therefore its time is changed to be up to date, the directory that containing the file will not have its directory updated.

My ultimate goal is to find the last changed file whose size is increasing the fastest or most, for my problem mentioned in the other post. So I also would like to know about that.

My OS is Ubuntu 12.04.

Thanks!

share|improve this question

1 Answer 1

find /search/root -printf "%T+ %10s %p\n" | sort -n --reverse

If you use GNU find and no file name (or path) contains a newline (which could be checked by a -path test).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.