From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PjBYn-0002Pt-UB for garchives@archives.gentoo.org; Sat, 29 Jan 2011 14:13:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B47B3E092D; Sat, 29 Jan 2011 14:12:25 +0000 (UTC) Received: from dcnode-02.unlimitedmail.net (smtp.unlimitedmail.net [94.127.184.243]) by pigeon.gentoo.org (Postfix) with ESMTP id 478C1E092D for ; Sat, 29 Jan 2011 14:12:24 +0000 (UTC) Received: from zoot.sax (hex.aaisp.net.uk [90.155.53.9] (may be forged)) (authenticated bits=0) by dcnode-02.unlimitedmail.net (8.14.3/8.14.3) with ESMTP id p0TECGZV014731 for ; Sat, 29 Jan 2011 15:12:16 +0100 Message-Id: <201101291412.p0TECGZV014731@dcnode-02.unlimitedmail.net> Date: Sat, 29 Jan 2011 13:54:39 +0000 From: Etaoin Shrdlu To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Cloning a directory hierarchy, but not the content In-Reply-To: <201101291458.13533.wonko@wonkology.org> References: <201101291458.13533.wonko@wonkology.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.20.1; x86_64-pc-linux-gnu) User-Agent: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SOLTECSIS-MailScanner-ID: p0TECGZV014731 X-SOLTECSIS-MailScanner-From: shrdlu@unlimitedmail.org X-Spam-Status: No X-Archives-Salt: X-Archives-Hash: b5fafd0124c5760a6d20f3a38271ab57 On Sat, 29 Jan 2011 14:58:13 +0100 Alex Schuster wrote: > Hi there! > > I am currently putting extra backups to old hard drives I do no longer > need for other purposes. After that I send the putput out ls -lR and du > -m to my log directory so I can check what files are on which drive > without having to attach the drive. > > Works, though a better method would be to clone the drive's root > directory, but with all file sizes being zero. This way I can easily > navigate the directory structure, instead of browsing through the ls-lR > file. Is there a utility that does this? It would be even better if the > files would be created as sparse files, faking the original size. > > I just wrote a little script that does this, but it does not do the > sparse file thing yet, and would have problems with newline in file > names. And I guess someone already wrote such a utility? IIUC, try find / -type d -exec sh 'mkdir -p target"$1"' - {} \;