You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
349 B
Bash

#!/bin/sh
# Find large files on this host
LARGE=${1:-100M}
WHERE=`mount -t ext2,ext3,ext4,btrfs,ntfs,reiserfs,xfs,zfs | awk '{ print $3 }'`
IGNORE='^(/var/lib/rpm/Packages|/home/.*/.btsync/.*\.db.*|.*/objects/pack/pack-.*\.pack|.*/\.recoll/xapiandb/.*\.DB|/run/media/.*)$'
sudo find $WHERE -xdev -size +$LARGE | grep --line-buffered -Ev "$IGNORE"