- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Copy or cpio command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 11:42 AM
08-22-2008 11:42 AM
Copy or cpio command
Then I used cp command with the option –h –p –R –f, which did better than cpio –pdm command but still the dates on the symbolic link files is changing to the current date of copy.
Please give me the appropriate command to copy the symbolic links as is with the modification dates and the ownership, along with the following:
My motive is:
1) To keep the mode(including bits)
2) To keep the modification date
3) Should copy the symbolic link as symbolic link with the source ownership and dates.
4) And also the user and group
Thanks in an advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 11:56 AM
08-22-2008 11:56 AM
Re: Copy or cpio command
The modication timestamp, ownership and permissions of symbolic links is immaterial.
It is the ownership and the permission of the file or directory that is pointed to by the symbolic link that matters for file access.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 11:59 AM
08-22-2008 11:59 AM
Re: Copy or cpio command
I know, but I just wanna make sure that I use the best option to copy over the files, which it is going to be a massive NFS project. So just wanna discuss this and go in right direction.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 12:01 PM
08-22-2008 12:01 PM
Re: Copy or cpio command
For replicating filesystems with 'cpio' I use:
# cd srcdir && find . -depth -print | cpio -pudlmv dstdir
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 12:05 PM
08-22-2008 12:05 PM
Re: Copy or cpio command
find . â print | cpio â ocxa | remsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 12:13 PM
08-22-2008 12:13 PM
Re: Copy or cpio command
cd to source top level directory
find . -print | cpio -ocxa | remsh target_server "cd /target/dir;cpio -icxvdmu"
make sure the .rhost is set on the target system and test it first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 12:16 PM
08-22-2008 12:16 PM
Re: Copy or cpio command
Again I will try on Monday and will let you all inform my progress.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 06:01 PM
08-22-2008 06:01 PM
Re: Copy or cpio command
You might try tar to see if it works better?
You could also use fbackup/frestore.
>the ownership of the symbolic links changing to root:system
Possibly because these tools don't know that now chown(1) has a -l option, lchown(2) to change the ownership?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2008 12:20 AM
08-25-2008 12:20 AM
Re: Copy or cpio command
>ownership and dates.
All your 4 options should be working except the date on the symbolic link. Even with fbackup or pax and other tools like tar/cpio/vxdump it does not work.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2008 07:34 AM
08-25-2008 07:34 AM
Re: Copy or cpio command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2008 06:04 AM
08-26-2008 06:04 AM
Re: Copy or cpio command
find . -depth -print -xdev | cpio -pdlmax /dest
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2009 04:13 PM
02-26-2009 04:13 PM
Re: Copy or cpio command
Divide in two parts!
Supose you are in curdir and would cpio to dstdir (create dstdir in advance).
cd curdir
## first not dirs
find -depth -not -type d -print0 | cpio -0pudlmv dstdir
## after... just dirs
find -depth -type d -print0 | cpio -0pudlmv dstdir
{}'s
MaRZ