D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] a command line copy command

 

On Thu, Nov 6, 2008 at 2:58 PM, Simon Robert <simon.robert@xxxxxxxxxxxxx> wrote:
> I have a situation where I boot from a live disk, in this case puppy,
> set up a wpa wifi configuration, then mount the hard drive, sda1, do a
> search for all files starting wpa* and then copy them from the live disk
> to the hard drive.
>
> I'm OK on all these steps except the last one. How do I copy multiple
> files in multiple directories to the equivilent locations on the hard
> drive? I guess it's a find / -name wpa* | grep something. ie from the
> live /etc/run/wpa_supplicant to the hd equivilent along with the 30
> other files needed?

This doesn't work completely --you'll have to cd into the
/etc/run/wpa_supplicant directory first-- but then something like
find . -name wpa* -exec cp {} /path/to/hd/{} \;
should probably work. I'm sure someone will know a more clever way though.

Martijn.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html