Skip to content

Instantly share code, notes, and snippets.

@florianbussmann
Created May 22, 2023 05:43
Show Gist options
  • Save florianbussmann/633babfce33f48d61234a7f166c8877d to your computer and use it in GitHub Desktop.
Save florianbussmann/633babfce33f48d61234a7f166c8877d to your computer and use it in GitHub Desktop.
Move large files away
find "/media/pi/" -type f -name *.mp4 -size +3G -print0 | xargs -d '\n' -0 sh -c '
for file do
echo "$file"
destination="'"../large"'"
mkdir -p "$destination/${file%/*}"
mv -v "$file" "$destination/$file"
done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment