- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- copy files from here to there...
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
Forums
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
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-16-2001 06:24 AM
08-16-2001 06:24 AM
eg: /dir/dir1/files
--to--
/dir3/files
Thanks a HEAP in advance
Ron Irving
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 06:28 AM
08-16-2001 06:28 AM
Re: copy files from here to there...
cd /dir1/dir2
tar cf - . | (cd /dir3 ; tar xf - )
This will keep all permissions and ownerships.
Unfortunately it does not carry over ACLs.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 06:28 AM
08-16-2001 06:28 AM
Re: copy files from here to there...
1?)
# cd /dir/dir1/files ; cp -rp ./ /dir3/files
2?)
# cd /dir/dir1/files ;
# tar cvpf - ./ | ( cd /dir3/files ; tar xf - )
You can do it also with cpio, dd, ..
PJA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 06:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 06:33 AM
08-16-2001 06:33 AM
Re: copy files from here to there...
This is an easy way:
# cd /sourcedirectory
# find . | cpio -pudlmv /destinationdirectory
This creates directories as needed, preserves modification timestamps, and reports the process of the copy as it proceeds.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 06:37 AM
08-16-2001 06:37 AM
Re: copy files from here to there...
cd /dir/dir1/files
find . | cpio -pdumvbx /dir3/files
If you do that, you will respect links, device files ( if there's any), perms, owner, etc.
I do this for migrating purposes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 07:11 AM
08-16-2001 07:11 AM
Re: copy files from here to there...
cp -rp /dir/dir1/files /dir3