rsync
or cp
-
Using rsync
-
find -E . -regex '.*\.(jpg|png|mp4|mp3|csv|txt)' -exec rsync -avzh {} ~/found/ \;
Using cp
-
mkdir ~/found
find -E . -regex '.*\.(jpg|png|mp4|mp3|csv|txt)' -exec cp {} ~/found/ \;
videos
directory -
Using rsync
-
find -E . -regex '.*\.(mp4)' -exec rsync -avzh {} ~/found/videos/ \;
Using cp
-
mkdir ~/found
find -E . -regex '.*\.(mp4)' -exec cp {} ~/found/videos/ \;
images
directory -
Using rsync
-
find -E . -regex '.*\.(jpg|png|jpeg)' -exec rsync -avzh {} ~/found/images/ \;
Using cp
-
mkdir ~/found
find -E . -regex '.*\.(jpg|png|jpeg)' -exec cp {} ~/found/images/ \;
Note: We can create simple shell script and put it as a cronjob, using rsync you can perform inremental backup of your data to another drive or folder.