Created
June 15, 2017 07:30
-
-
Save kencoba/88b9565916ce6d78c336e335f3dce326 to your computer and use it in GitHub Desktop.
copy directory tree. exclude files.
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
#!/usr/bin/env zsh | |
if [ $# -ne 2 ]; then | |
echo "$# args specified" 1>&2 | |
echo "usage: sh ./copyDir.sh from_directory to_directory" 1>&2 | |
exit 1 | |
fi | |
from_dir=$1 | |
to_dir=$2 | |
rsync -avz --include "*/" --exclude "*" $from_dir/* $to_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment