简体   繁体   中英

php script just filled up harddrive with junk how do i find it?

I just ran a php script which filled up my nix servers harddrive with 15GB of some sort of junk, how do i find the junk so I can delete it? I'm not sure if it's a huge error_doc file or what

One option is to use the find command.

find / -type f -size +50M

Will search downwards from the root directory for items which are files larger than 50MB. If you want to limit how many subdirectories you want to search, you can use the -maxdepth switch.

find / -maxdepth 3 -type f -size +50M

will look for files larger than 50MB, but will only recurse 3 directories down.

This assumes that you know that the files which were created are larger than a certain size, and you can pick them out if they are displayed.

You might also be able to make use of the knowledge that the files were created recently.

find / -type f -mmin 60

should find files which were modified in the past hour.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM