coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 27, 2012


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 22 guests online

Newest Member

beyondimagem

Hit Counter
9133536 Visitors

cool Statistics
coolcommands:1330
Categories:83
Total queries:595500
Members:16437





Category Search coolcommands.com
Select Category:


coolcommand

cpio - copy source directory or filesystem to a another destination
Description

To copy a source directory or filesystem to a destination directory or filesystem on the same server:

As root, run:

# cd /source ; find . -print | cpio -pdm /destination

To verify copy was successful:

From source directory or filesystem:

# find . -type f -ls | awk '{print $11 " " $7}' | awk -F"[ /]" '{print $(NF-1) " " $NF}' | sort > /tmp/zzz1

From destination directory or filesystem:

# find . -type f -ls | awk '{print $11 " " $7}' | awk -F"[ /]" '{print $(NF-1) " " $NF}' | sort > /tmp/zzz2

Run a diff on the two files created:

# sdiff /tmp/zzz1 /tmp/zzz2

OR

# dircmp -s source destination
Example

cd /source ; find . -print | cpio -pdm /destination

Return to search results

Random coolcommands

coolcommand: setboot - to set alternate boot path to a new mirrored disk in HP/UX
Example: ioscan -funC disk; setboot -a 0/0/1/1.2.0
[show me the details]
coolcommand: vmkfstools- how to copy a VMFS volume in VMware to clone a disk
Example: vmkfstools -e /vmfs/vmfsname/target.vmdk -d vmfs /vmfs/vmfsname/source.vmdk
[show me the details]
coolcommand: dircolors - change colors for ls command in Linux
Example: /etc/DIR_COLORS
[show me the details]
coolcommand: m64config - how to change the resolution of the M64 graphics accelerator in Sun Solaris
Example: m64config -res 'video_mode'
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1152
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris49379
Category AIX46267
Category General UNIX43933
solaris22927
aix22116

Terms of Use
Privacy
Contact


 
coolcommands.com © 2012. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum