Steps to find and delete the top 100 most used files in
Linux/Unix
Command to find most disk space used
files:
find / -xdev -type f -size +100M -exec du -sh {} ';' |
sort -rh | head -n100
Command to delete the content without
removing the file
> <<filename>>
E.g.
>
sample.txt
Here > is used to empty the file
Thanks for reading this article and please do subscribe to get more updates
Thanks for reading this article and please do subscribe to get more updates
0 comments:
Post a Comment