[Wylug-help] copy /dev
Jim Jackson
jj at franjam.org.uk
Sat Feb 17 21:56:21 GMT 2007
On Sat, 17 Feb 2007, Don Magee wrote:
>
> Hi
>
> I feel sure that there is a simple answer to this question but I haven't
> found it yet. I am making a copy of a boot disk to put on a different
> machine. I've used dd in the past and it all works fine. But this time
> the partition size is different so I am using cp. But how do you make an
> exact copy of /dev. There doesn't seem to be a cp option or a specific
> program to do the job.
"tar" can do it.
something like
(cd /mnt/part1 ; tar clf - ) | ( cd /mnt/part2 ; tar xfv - -p )
some of the options explained....
-c, --create
create a new archive
-l, --one-file-system
stay in local file system when creating an archive
-f, --file [HOSTNAME:]F
use archive file or device F (default "-", meaning
stdin/stdout)
-x, --extract, --get
extract files from an archive
-v, --verbose
verbosely list files processed
-p, --same-permissions, --preserve-permissions
extract all protection information
More information about the Wylug-help
mailing list