How to locate large files (> 100 MB) in /home/
for 'cleaning'?
It's Centos 6.x. I tried some commands, but they didn't work.
How to locate large files (> 100 MB) in /home/
for 'cleaning'?
It's Centos 6.x. I tried some commands, but they didn't work.
Find has it's own
-delete
option soshould do what you want. Just be careful about where you put the -delete option
If you want to test this before using it then you need to add
-depth
as-delete
implies it.ncdu
is a nice interactive tool to find big files or directories. It will scan a given directory and show a simple ncurses interface to present sizes of directories. It also has a shortcut to delete a file/directory.Just find:
find /home -type f -size +100M
find and remove
find /home -type f -size +100M -print0 |xargs -0 rm
It searches not for large files but for large folders. In case of running out of file space I try to look both for large files and large folders to identify problematic areas.