#!/bin/ksh
#
tarpipe ()
{
# create dest if not already
[ ! -d "$2" ] && mkdir "$2"
# copy it over
tar cCf "$1" - . | tar xCf "$2" -
}
tarpipe "$1" "$2"
Sunday, 14 April 2013
Home »
Shell Scripting
» Copy directory and sub-directories
0 blogger-disqus:
Post a Comment