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
06-06-2005 11:46 PM
06-06-2005 11:46 PM
i want to do rcp for a directory containing lots of directories and files from machine x in /tmpsrc to machine y in /tmpdst
i think i shall write something like this
rcp -r y:/tmpdst /tmpsrc
can someone tell me how to do it, or what i wrote is right or not ?
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2005 11:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2005 12:02 AM
06-07-2005 12:02 AM
Re: RCP
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2005 01:28 AM
06-07-2005 01:28 AM
Re: RCP
The -r option as the OP specified gets the subdirs. The -p option preserves ownership and file modes....
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2005 01:40 AM
06-07-2005 01:40 AM
Re: RCP
You need the syntax as follows.
rcp -pr /source_dir/ remote_system:/destination/
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2005 01:40 AM
06-07-2005 01:40 AM
Re: RCP
rcp(1) rcp(1)
-p This option can be used to preserve (duplicate)
modification times and modes (permissions) of
source files, ignoring the current setting of the
umask file creation mode mask. If this option is
specified, rcp preserves the sticky bit only if
the target user is superuser.
If the -p option is not specified, rcp preserves
the mode and owner of dest_file if it already
exists; otherwise rcp uses the mode of the source
file modified by the umask on the destination
host. Modification and access times of the
destination file are set to the time when the copy
was made.
***********************************
-r This option can be used to recursively copy
directory subtrees rooted at the source directory
name. If any directory subtrees are to be copied,
rcp recursively copies each subtree rooted at the
specified source directory name to directory
dest_dir. If source_dir is being copied to an
existing directory of the same name, rcp creates a
new directory source_dir within dest_dir and
copies the subtree rooted at source_dir to
dest_dir/source_dir. If dest_dir does not exist,
rcp first creates it and copies the subtree rooted
at source_dir to dest_dir and the output will be
similar irrespective of whether a wildcard
character (source_dir/*) is used for copying or
otherwise.
*************************************
And Finally,i am agree with Pete...
Good luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2005 01:41 AM
06-07-2005 01:41 AM
Re: RCP
If yes, then have a look at rdist
I run it like so from cron:
# Copy bwpadm across to the DR site.
15 01 * * * /app/admin/drp/update-binaries.sh >/tmp/update-binaries.cron 2>&1
# cat update-binaries.sh
#! /bin/sh
# Keep the DRP copy of the bwpadm up-to-date.
# Currently the files are in:
#
# /home/bwpadm/DR
#
# See the rdist(1M) distfile for a list of exclusions.
DRPDIR=/app/admin/drp
DRPHOST=svr102
HOST=`/usr/bin/uname -n`
mount | grep /home > /dev/null 2>&1
if [ $? -eq 0 ]
then
/usr/sbin/vgexport -p -s -v -m /home/bwpadm/DR/vg10.map /dev/vg10
( su - bwpadm -c "rdist -f $DRPDIR/distfile bwpadm"; ) 2>&1 |\
tee $DRPDIR/drp.log 2>&1 |\
mailx -s "bwpadm DRP rdist output" `cat /usr/local/mailadmin.list`
fi
# cat distfile
BWPDR = ( svr102 )
#
# File systems to be copied over to the DR host.
# Don't use -R in install - so as not to remove files on destination host
BWPADM = /home/bwpadm
bwpadm: ( ${BWPADM} ) -> ( ${BWPDR} )
install -w ;
Rgds...Geoff