find
find
move files
find . -type f -print0 | xargs -0 -I {} mv {} dest/pathsearch depth
to stay in the current folder when searching, use -d for the depth, or change it to search through more levels of directories:
find . -type f -d 1find and delete broken symlinks
find . -type l ! -exec test -e {} \; -printuse -delete to remove them right away:
find . -type l ! -exec test -e {} \; -deletefind incomplete / dead rsync transfers
find them:
find /mnt/media/ -type f -iname ".*.*.??????" -lsdelete them:
find /mnt/media/ -type f -iname ".*.*.??????" -deletedelete files that don’t match pattern
assuming you have a folder full of files and you only want to keep all files starting with us- and ca- and delete all others:
find . -type f ! -name 'us-*' ! -name 'ca-*' -print0 | xargs -0 rmfind 0 byte files
… you may want to double check if you actually want to delete them, but I had some conflicts in syncthing and checked for them manually
find /data -size 0find files older than n
files changed in the last day:
find . -mtime -1files older than 365 days:
find ~/Library/Preferences -mtime +365you can also add time units +365h:
s second
m minute (60 seconds)
h hour (60 minutes)
d day (24 hours)
w week (7 days)