Created
March 7, 2014 20:15
-
-
Save onfire4g05/a23b20fcaa04d62f305b to your computer and use it in GitHub Desktop.
Will move files based on time specified, keeping directory structure
This file contains hidden or 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 . -mtime +1786 -type f -print0 | xargs -0 -I {} sh -c ' | |
file="{}" | |
destination="/var/shares/primary/backup-images" | |
mkdir -p "$destination/${file%/*}" | |
mv "$file" "$destination/$file"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment