Created
December 20, 2012 16:32
-
-
Save adamamyl/4346500 to your computer and use it in GitHub Desktop.
rsync useful dirs from Mac ('hokey') -> removable disk
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
root@hokey:/# for D in `ls -lha | awk '/^d/ {print $NF}' | egrep -v '^(.Spotlight-V100|.Trashes|Volumes|dev)' | tail -n +3`; do echo "--------- Looking at ${D} -------"; rsync -vua /${D}/ /Volumes/Hokey-Backup/hokey-system/${D}/; done | |
# yes I could use awk instead of egrep. | |
# I prefer for() over while() for some reason. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment