rdist -- but not linked files


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users rdist -- but not linked files
# 1  
Old 11-14-2003
rdist -- but not linked files

How do I rdist a directory from one server to another, excluding soft and hard links?

current rdist syntax:

1 2 * * * cd /apps/oasis/prdsch/log; rdist -c j1*.log oasis@oastdby:/apps/schiller/oasis/prdsch/log

31 2 * * * cd /apps/oasis/prdsch/log; rdist -c oasis_bin_trans*.log oasis@oastdby:/apps/schiller/oasis/prdsch/log

Currently all files ending in .log copied using rdist. I have a number of soft links in the same directory ending in .log and wish to exclude them.

Thanks.
# 2  
Old 11-14-2003
Hi,

There's no argument to exclude links from being "rdisted". You can, however, create a list of links that you don't want to copy and define them on the distfile... Maybe some script using ls-ld...
# 3  
Old 11-15-2003
You could also utilize the find command, ie:


1 2 * * * find /apps/oasis/prdsch/log -name j1*.log -exec rdist {} oasis@oastdby:/apps/schiller/oasis/prdsch/log

find's default behavior is not to follow symbolic links. You have to specify -follow to have it do so.

Cheers,

Keith

Last edited by kduffin; 11-17-2003 at 10:00 PM..
# 4  
Old 11-17-2003
Here's what I setup before leaving work Friday:

j1="`find /apps/oasis/prdben/log -name "j1*log" -ctime -30`"
for var in $j1 ; do
rdist -c $var oasis@oastdby:
done

It still copies the links...Why?

Thanks.
# 5  
Old 11-17-2003
Remember that you can take the antethisis of options in find using !

Change your variable to:

j1="`find /apps/oasis/prdben/log ! -type l -name "j1*log" -ctime -30`"

Cheers,
Keith

Last edited by kduffin; 11-17-2003 at 10:00 PM..
# 6  
Old 11-18-2003
The modified script is working for me; transfering files without including soft or hard links. Are you using it successfully?

Cheers,

Keith
# 7  
Old 11-18-2003
I just checked and it worked perfectly. Many thanks for your expertise!

This is a great forum.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

List linked files

A perl script that displays the list of files which have multiple links..! ls -l shows number of links in a field. (0 Replies)
Discussion started by: aadi_uni
0 Replies

2. UNIX Desktop Questions & Answers

orphan soft linked files

How can we find files that were soft linked to an original file and then the original has been deleted. these soft linked files won't then be accessible. How can we find orphan linked files? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

3. Shell Programming and Scripting

How to retrieve all the linked script files/ctl files/sql files?

Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux. Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies

4. Solaris

Rdist over ssh

How can we make rdist to work over ssh? By default rdist works with rsh protocol which is now the host server is refuses to accept the rsh connection. How to find rdist version which I am running? How to upgrade it to latest version? Working environment is solaris 9 and solaris 10. (1 Reply)
Discussion started by: naveenjami
1 Replies

5. UNIX for Dummies Questions & Answers

rdist from unix to window XP

I need to rdist some files from unix to window XP, where the source file is in Unix box. I can't get a way to do it as it always prompted me permission denied. rdist -c migtest.tar <ipaddr>:/filedir/migtest.tar updating host <ipaddr> Permission denied. I'd tried to ftp and put the file... (0 Replies)
Discussion started by: lenniegu
0 Replies

6. HP-UX

Where can I find rdist?

Hello, I am looking for either the rdist binaries or code for HPUX 11.11. Thanks (1 Reply)
Discussion started by: rfisher001
1 Replies

7. HP-UX

Return codes of RDIST

Can any body please tell me the return codes of RDIST tool? I am using RDIST (through an UNIX script) to synchronize files between two servers say ukblx151(source) & ukapx050(target). RDIST raises an alert mail (through notify option) in case of success & also failure but there is a problem if... (0 Replies)
Discussion started by: vishal_ranjan
0 Replies

8. UNIX for Advanced & Expert Users

Files Linked With A Binary

Hi, What is command in unix to find what are all the files linked with an executable binary. Thanks in advance. Rgds, Omkumar (2 Replies)
Discussion started by: tc.omkumar
2 Replies

9. UNIX for Advanced & Expert Users

permissions with rdist

I am trying to synchronize to boxes running True64 Unix one as a live backup of the other for user directories. When running rdist, I receive the message "Permission Denied" when each directory is accessed with the sole exception of my own directory. This has to be an automated process which... (1 Reply)
Discussion started by: doug_hutch
1 Replies

10. UNIX for Advanced & Expert Users

help with rdist utility

Does anyone know of any known bugs/issues with the RDIST utility on HP unix? I am trying to set up replication between two servers. All seems to work okay to start with, but the rdist program always terminates with a value of 1 - i.e. signifying an error. However - no error message or even warning... (1 Reply)
Discussion started by: man_with_no_nam
1 Replies
Login or Register to Ask a Question