Search code examples
linuxaix

Refresh directory Size in Linux


I have delete all files older than two days from my directories using:

find . -mtime +2 -exec rm {} \;

the files got deleted fine but the size of the directories has not changed is there anything I can do to refresh the size? I have tries pwd but nothing. enter image description here


Solution

  • Have you checked lsof? If some application uses files they are not actually deleted till they close them. But I am not sure that this affects dir size.