LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to find out which files increase most recently? (http://www.linuxquestions.org/questions/linux-server-73/how-to-find-out-which-files-increase-most-recently-509403/)

jimmyjiang 12-11-2006 10:32 AM

how to find out which files increase most recently?
 
hi,
my redhat linux server's home directory keep increase the size, I want to find out any file created or increase size cause that, any command can do this job?
thanks!
jimmy

unSpawn 12-11-2006 10:57 AM

If the file is opened you could try and find it watching
Code:

wach -n 10 'lsof -w -n +D /home|awk '{print $7, $NF}' | sort -grk1'
(man lsof for flags)

else if you want a global indication and if it's filling fast:
Code:

watch -n 1 'du /home/*'
else
Code:

watch -n 5 'find /home -type f -mmin 5 -printf "%k %p %c\n" | sort -grk1 | head -10'
Values "-n" and "-mmin" might need tweaking to better match your situation.


All times are GMT -5. The time now is 08:02 AM.