Mario Charest
07/10/2008 12:47 PM
post10340
|
Only -r and -p are documented
So I guess there is not way to do the equivalent of cp's -f?
> Hi Mario:
>
> The undocumented "-f" option in cp (force an unlink) looks like
> it has a very different meaning for rcp. Here's the arg parsing for
> rcp:
>
> while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
> switch(ch) {
> /* user-visible flags */
> case 'p': /* preserve access/mod
> times */
> ++pflag;
> break;
> case 'r':
> ++iamrecursive;
> break;
> #ifdef KERBEROS
> case 'k':
> strncpy(dst_realm_buf, optarg, REALM_SZ);
> dest_realm = dst_realm_buf;
> break;
> #ifdef CRYPT
> case 'x':
> doencrypt = 1;
> /* des_set_key(cred.session, schedule); */
> break;
> #endif
> #endif
> /* rshd-invoked options (server) */
> case 'd':
> targetshouldbedirectory = 1;
> break;
> case 'f': /* "from" */
> iamremote = 1;
> fflag = 1;
> break;
> case 't': /* "to" */
> iamremote = 1;
> tflag = 1;
> break;
>
> case '?':
> default:
> usage();
> }
>
>
> The -f is a) tied to the server side and b) refer to direction of copy
> rather than anything to do with how the copy is carried out. So I'm not
> sure what it's doing with how you've invoked it, but it isn't what you
> expected :>.
>
> Robert.
>
>
> -----Original Message-----
> From: Mario Charest [mailto:mcharest@zinformatic.com]
> Sent: Wednesday, July 09, 2008 4:08 PM
> To: technology-networking
> Subject: issue with rcp
>
>
> While trying to copy a file via rcp I got the Resource busy error which
> in this case was normal.
>
> Although not document I tried to see if the -f option of cp would do the
> same with rcp.
>
> What I got is rcp being reply blocked on devc-pty, forever.
>
> Most other options return an illegal option but some seems to try to do
> something -t -f etc.
>
> Any way to fix my original problem, the resource busy stuff.
>
>
> _______________________________________________
> Technology
> http://community.qnx.com/sf/go/post10278
|
|
|