Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

clone(3pm) [debian man page]

Clone(3pm)						User Contributed Perl Documentation						Clone(3pm)

NAME
Clone - recursively copy Perl datatypes SYNOPSIS
use Clone; push @Foo::ISA, 'Clone'; $a = new Foo; $b = $a->clone(); # or use Clone qw(clone); $a = { 'foo' => 'bar', 'move' => 'zig' }; $b = [ 'alpha', 'beta', 'gamma', 'vlissides' ]; $c = new Foo(); $d = clone($a); $e = clone($b); $f = clone($c); DESCRIPTION
This module provides a clone() method which makes recursive copies of nested hash, array, scalar and reference types, including tied variables and objects. clone() takes a scalar argument and an optional parameter that can be used to limit the depth of the copy. To duplicate lists, arrays or hashes, pass them in by reference. e.g. my $copy = clone (@array); # or my %copy = %{ clone (\%hash) }; For a slower, but more flexible solution see Storable's dclone(). AUTHOR
Ray Finch, rdf@cpan.org Copyright 2001 Ray Finch. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Storable(3). perl v5.14.2 2009-01-20 Clone(3pm)

Check Out this Related Man Page

Clone(3)						User Contributed Perl Documentation						  Clone(3)

NAME
Clone - recursively copy Perl datatypes SYNOPSIS
package Foo; use parent 'Clone'; package main; my $original = Foo->new; $copy = $original->clone; # or use Clone qw(clone); $a = { 'foo' => 'bar', 'move' => 'zig' }; $b = [ 'alpha', 'beta', 'gamma', 'vlissides' ]; $c = Foo->new; $d = clone($a); $e = clone($b); $f = clone($c); DESCRIPTION
This module provides a clone() method which makes recursive copies of nested hash, array, scalar and reference types, including tied variables and objects. clone() takes a scalar argument and duplicates it. To duplicate lists, arrays or hashes, pass them in by reference. e.g. my $copy = clone (@array); # or my %copy = %{ clone (\%hash) }; SEE ALSO
Storable's dclone() is a flexible solution for cloning variables, albeit slower for average-sized data structures. Simple and naive benchmarks show that Clone is faster for data structures with 3 or less levels, while dclone() can be faster for structures 4 or more levels deep. COPYRIGHT
Copyright 2001-2013 Ray Finch. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Ray Finch "<rdf@cpan.org>" Breno G. de Oliveira "<garu@cpan.org>" and Florian Ragwitz "<rafl@debian.org>" perform routine maintenance releases since 2012. perl v5.18.2 2013-12-07 Clone(3)
Man Page

14 More Discussions You Might Find Interesting

1. Solaris

I need to clone an ultra 1 onto and ultra 60

I need to move everything from an older ultra 1 onto a newer ultra 60 (OS and all) running SUNOS 5.5.1. Any suggestions on the best way to do this? Frank P.S. If you know of a document somewhere please let me know. (11 Replies)
Discussion started by: frankkahle
11 Replies

2. UNIX Desktop Questions & Answers

How do I clone Solaris 7 disk

could anyone give me a general idea of how i may clone a 2 Gig disk running Solaris 7 on it to another disk of the same size? currently, this system only has one disk in it though. i do have the ability to hook up another disk via SCSI. i have been told i need to boot to "miniroot" to run... (9 Replies)
Discussion started by: obosha
9 Replies

3. Solaris

Cloned drive won't boot ?

Solaris system version 6 I cloned the drive using the DD command. Using the format command and examining the partitions, all looks the same as the original drive. Problem: When I attach the cloned drive as the master, and only drive in system, it will not boot. Error messages: ... (9 Replies)
Discussion started by: HikerLT
9 Replies

4. Solaris

Solaris 8 Clone - Help

I've got two drives in the same Sun server and I've been cloning the boot drive to the secondary drive by using both ufsdump/ufsrestore and the dd command sucessfully. When I try and boot the cloned drive I get the following error: WARNING - /usr/sbin/fsck not found. Most likely the mount... (10 Replies)
Discussion started by: johnj1965
10 Replies

5. Solaris

How to clone enter harddisk on Sun Sparc20?

Hi mates, well before posting my problem, i really searched hi and low for some ideas, but sad to say none of them worked, including dd command. My problem is that i have 2 harddisk, 1 in use and 1 for spare. The one im using got crashed and now im using my spare harddisk with all the... (24 Replies)
Discussion started by: Ron Macam
24 Replies

6. Ubuntu

Mounting a disk clone

I wasn't sure where to put this thread but since i use ubuntu for data recovery, I figured this is the best place. So, a friend passed me a 250G Western Digital hard disk the other day and said that his client needs to get her pictures off it. the problem: windows says it wants to reformat the... (13 Replies)
Discussion started by: old noob
13 Replies

7. Ubuntu

Can't successfully clone an HDD in Ubuntu, please help

Hi guys, I am total newbie to Linux / Ubuntu but trying it to solve the problem I have. I have an OKI printer with bad HDD and trying to clone one from the same HDD from working printer. Board it goes on has a Fiery chipset and system used is Linux based / related - to the best of my knowlege. I... (12 Replies)
Discussion started by: Unlimitedbt
12 Replies

8. HP-UX

HP-UX server cloning

Hello Friends, Am in requirement to clone a Live HP-UX server here's details OS: HpUX B-11.11 with mirrored LVM disks . S/ws: Remedy, XML engine, Annoysystem, Oracle All Oracle, XMl and Remedy data is on SAM LUN which is used for clustering . My requirement to create a clone server and... (10 Replies)
Discussion started by: Shirishlnx
10 Replies

9. Solaris

Canīt open /dev/dsk/c1t0d0s0 Clone/mirror

Hello friends, I Working with Solaris 8 on a SunFireV890, 150 GB SCSI HD's in Raid 1 (mirroring), my problem is that the master disk failed and going to put the slave (mirror) as a Master in the slot 0 (SCSI) will not start. The original mounting this, mirror in Raid 0: c1t0d0s0 (master)... (10 Replies)
Discussion started by: grymorum
10 Replies

10. Solaris

system clone : sun4V --->sun4u ?

Hi, First sorry for my english ! I'm a newbie on Solaris and I'm trying to clone a SUN T5220 (sun4V platform) on SUN V240 (sun4u platform) using ufsdump/ufsrestore. Dumping all filesystem and restoring it on the V240 box and Make the disk bootable using installboot command. When... (21 Replies)
Discussion started by: manata
21 Replies

11. UNIX for Dummies Questions & Answers

How to "clone" a directory and it's symlink?

Hi all, Am trying to make a backup of a directory to move it to a new directory 'coz I need to do a re-install of a software. On Linux, I can do cp -rpH but not on Solaris? Example is as below: ls -l dir1 total 0 -rw-r----- 1 oracle dba 0 Aug 9 13:08 fil3.txt... (9 Replies)
Discussion started by: newbie_01
9 Replies

12. HP-UX

How to clone a 382-workstations hdd?

Hi there, I got a pretty old HP 382 workstation, and the hdd is pretty LOUD ... ;) So I thought I clone it to an much quiter one. I tried this: - removed the loud hdd - connected it to an system running knoppix 7.0.4 (hdd is recognized with UFS filesystem; Clonezilla couldn't handle the... (9 Replies)
Discussion started by: pelegrine
9 Replies

13. AIX

Clone or mirror your AIX OS larger disk to smaller disk ?

hello folks, I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Discussion started by: filosophizer
9 Replies

14. UNIX for Dummies Questions & Answers

Clone redhat to another PC

Hi, I'm a new user of this forum and I'm not an expert of linux. I have a broken old pc with red hat linux, I clone hdd to another pc with different mainboard and it's ok but it has only one problem, the usb ports not work. In the boot this message appears: ... (9 Replies)
Discussion started by: aitv
9 Replies