Re: [Hampshire] Shell help - copying files

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Shell help - copying files

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x57d37100.hantslug.org.uk.19863': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Thu Apr 9 11:49:51 2009 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Thu, Apr 09, 2009 at 11:45:54AM +0100, Hugo Mills wrote:
> $ find /existing/dir -type f -print0 | sed -e s:^.*/:: | sort >existing-files.txt


Whoops -- remove the -print0 from this line. It's not necessary here.

> $ (cd /new/dir && ls | sort) >new-files.txt
> $ join -t $'\0' -a 1 new-files.txt existing-files.txt >files-to-copy.txt


Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- You can get more with a kind word and a 2"x4" than you can ---    
                         with just a kind word.