From owner-freebsd-questions Tue Oct 1 10:58:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A089537B401 for ; Tue, 1 Oct 2002 10:58:40 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DB9E43E3B for ; Tue, 1 Oct 2002 10:58:40 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.5) id g91HwcR4023566; Tue, 1 Oct 2002 12:58:38 -0500 (CDT) (envelope-from dan) Date: Tue, 1 Oct 2002 12:58:38 -0500 From: Dan Nelson To: Beech Rintoul Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Copying directories contents Message-ID: <20021001175837.GF7147@dan.emsphone.com> References: <200210010955.35018.akbeech@anchoragerescue.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210010955.35018.akbeech@anchoragerescue.org> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Oct 01), Beech Rintoul said: > I'm need to take the contents including dotfiles from about 300 user > directories and move them into another set of identical directories on > another filesystem. Is there an easy script to do this? I dont want to > overwrite the contents of the target directories just add to them. > Both filesystems are mounted on the source machine. tar cf - user1 user2 user3 user4 | ( cd /destination ; tar xpf - ) Change "tar xpf" to "tar xpkf" if you don't want to overwrite exisitng files in the destination directory. "cp -r" might work also; I have never tried it when the destination was aready populated with files, though. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message