Quantcast
Channel: find and remove files bigger than a specific size and type - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 4 View Live

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 Article


Answer 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 Article

Answer 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 Article

find 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
Browsing latest articles
Browse All 4 View Live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>