[Linux general] copy diff of 2 folders to a separate folder

Nils Kassube kassube at gmx.net
Thu Mar 11 07:15:56 UTC 2010


Thomas Kaiser wrote:
> On 03/10/2010 11:03 PM, Brian McKee wrote:
> > for ITEM in $(cat listOfFilesToCopy.txt) ; do cp -v "$ITEM"
> > outputFolder ; done
> 
> This doesn't work because the full path name is missing.
> Anyway, with the above command I get my thing done!

I think it should work if you use this:

for ITEM in $(cat listOfFilesToCopy.txt) ; do
  cp -a --parents "$ITEM" outputFolder
done


Nils




More information about the ubuntu-users mailing list