↧
Answer by Matthew Hub for find and remove files bigger than a specific size...
Based on the above answers I used below command to clear the server from big log files (after cd'ing into /var/lib/jenkins)find -type f -name *log -size +500M -delete
View ArticleAnswer by techraf for find and remove files bigger than a specific size and type
If you want to exclude files by name, you can use this syntax:find . -type f ! -name '*.mp3' ! -name '*.mp4' -size +1M -deleteor if your find does not support delete:find . -type f ! -name '*.mp3' !...
View ArticleAnswer by Sundeep for find and remove files bigger than a specific size and type
find -type f \( -name "*zip" -o -name "*tar" -o -name "*gz" \) -size +1M -deletethe \( \) construct allows to group different filename patternsby using -delete option, we can avoid piping and troubles...
View Articlefind and remove files bigger than a specific size and type
I want to clean up my server from large log files and backups.I came up with this:find ./ -size +1M | xargs rmBut I do not want to include mp3 and mp4. I just want to do this for log and archive files...
View Article
More Pages to Explore .....