Created
August 5, 2011 06:02
-
-
Save a10y/1126995 to your computer and use it in GitHub Desktop.
find
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Find move all mp4 movies in a directory to an external drive/folder, than delete all large files | |
LARGE_FILE_SIZE=500 ##in MB | |
START_DIR=$HOME | |
EXTERN_DIR=/Volumes/Extern/movies | |
find $START_DIR -type f -name "*.mp4" -exec mv {} $EXTERN_DIR ';' | |
find $START_DIR -type f -size +${LARGE_FILE_SIZE}M -exec rm {} ';' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment