Sponsored Content
Full Discussion: cp command
Top Forums UNIX for Dummies Questions & Answers cp command Post 302131425 by joerg on Friday 10th of August 2007 05:02:15 PM
Old 08-10-2007
Hammer & Screwdriver rcp

No one use it because it is not secure!
rcp this is the command.

man rcp # for more information

But to move files from one serer to an other every body use the
sftp <user_name>@hostname
insert password and then use get or put to move files!

regards joerg
 

10 More Discussions You Might Find Interesting

1. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

2. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

3. AIX

AIX:Command to get netaddress/subnet address command in IPv4/IP6

AIX:Command to get netaddress/subnet address command in IPv4/IP6 Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine. net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies

4. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

5. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

6. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

7. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

8. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

9. AIX

I'm facing problem with rpm command, when running the command and appears this error:

exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors: 0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1). 0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded. 0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies

10. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies
rcp(1)								   User Commands							    rcp(1)

NAME
rcp - remote file copy SYNOPSIS
rcp [-p] [-a] [-x] [-PN | -PO] [-k realm] filename1 filename2 rcp [-pr] [-a] [-x] [-PN | -PO] [-k realm] filename... directory DESCRIPTION
The rcp command copies files between machines. Each filename or directory argument is either a remote file name of the form: hostname:path or a local file name (containing no ":" (colon) characters, or "/" (backslash) before any ":" (colon) characters). The hostname can be an IPv4 or IPv6 address string. See inet(7P) and inet6(7P). Since IPv6 addresses already contain colons, the hostname should be enclosed in a pair of square brackets when an IPv6 address is used. Otherwise, the first occurrence of a colon can be interpreted as the separator between hostname and path. For example, [1080::8:800:200C:417A]:tmp/file If a filename is not a full path name, it is interpreted relative to your home directory on hostname. A path on a remote host may be quoted using , ", or ', so that the metacharacters are interpreted remotely. Please notice that the kerberized versions of rcp are not IPv6-enabled. rcp does not prompt for passwords. It either uses Kerberos authentication which is enabled through command-line options or your current local user name must exist on hostname and allow remote command execution by rsh(1). The rcp session can be kerberized using any of the following Kerberos specific options : -a, -PN or -PO, -x, and -k realm. Some of these options (-x and -PN or -PO) can also be specified in the [appdefaults] section of krb5.conf(4). The usage of these options and the expected behavior is discussed in the OPTIONS section below. If Kerberos authentication is used, authorization to the account is controlled by rules in krb5_auth_rules(5). If this authorization fails, fallback to normal rcp using rhosts will occur only if the -PO option is used explic- itly on the command line or is specified in krb5.conf(4). If authorization succeeds, remote copy succeeds without any prompting of pass- word. Also notice that the -PN or -PO, -x, and -k realm options are just supersets of the -a option. rcp handles third party copies, where neither source nor target files are on the current machine. Hostnames may also take the form username@hostname:filename to use username rather than your current local user name as the user name on the remote host. rcp also supports Internet domain addressing of the remote host, so that: username@host.domain:filename specifies the username to be used, the hostname, and the domain in which that host resides. File names that are not full path names will be interpreted relative to the home directory of the user named username, on the remote host. OPTIONS
The following options are supported: -a This option explicitly enables Kerberos authentication and trusts the .k5login file for access-control. If the authoriza- tion check by in.rshd(1M) on the server-side succeeds and if the .k5login file permits access, the user is allowed to carry out the rcp transfer. -k realm Causes rcp to obtain tickets for the remote host in realm instead of the remote host's realm as determined by krb5.conf(4). -p Attempts to give each copy the same modification times, access times, modes, and ACLs if applicable as the original file. -PO Explicitly requests new (-PN) or old (-PO) version of the Kerberos "rcmd" protocol. The new protocol avoids many security -PN problems prevalant in the old one and is regarded much more secure, but is not interoperable with older (MIT/SEAM) servers. The new protocol is used by default, unless explicitly specified using these options or through krb5.conf(4). If Kerberos authorization fails when using the old "rcmd" protocol, there is fallback to regular, non-kerberized rcp. This is not the case when the new, more secure "rcmd" protocol is used. -r Copies each subtree rooted at filename; in this case the destination must be a directory. -x Causes the information transferred between hosts to be encrypted. Notice that the command is sent unencrypted to the remote system. All subsequent transfers are encrypted. USAGE
See largefile(5) for the description of the behavior of rcp when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). The rcp command is IPv6-enabled. See ip6(7P). IPv6 is not currently supported with Kerberos V5 authentication. For the kerberized rcp session, each user may have a private authorization list in a file .k5login in their home directory. Each line in this file should contain a Kerberos principal name of the form principal/instance@realm. If there is a ~/.k5login file, then access is granted to the account if and only if the originater user is authenticated to one of the principals named in the ~/.k5login file. Other- wise, the originating user will be granted access to the account if and only if the authenticated principal name of the user can be mapped to the local account name using the authenticated-principal-name -> local-user-name mapping rules. The .k5login file (for access control) comes into play only when Kerberos authentication is being done. EXIT STATUS
The following exit values are returned: 0 All files were copied successfully. >0 An error occurred. See the NOTES section for caveats on the exit code. FILES
$HOME/.profile $HOME/.k5login File containing Kerberos principals that are allowed access /etc/krb5/krb5.conf Kerberos configuration file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrcmdc | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
cpio(1), ftp(1), rlogin(1), rsh(1), setfacl(1), tar(1), tar(1), in.rshd(1M), hosts.equiv(4), krb5.conf(4), attributes(5), largefile(5), krb5_auth_rules(5), inet(7P), inet6(7P), ip6(7P) NOTES
rcp is meant to copy between different hosts. Attempting to rcp a file onto itself, as with: example% rcp tmp/file myhost:/tmp/file results in a severely corrupted file. rcp may not correctly fail when the target of a copy is a file instead of a directory. rcp can become confused by output generated by commands in a $HOME/.profile on the remote host. rcp requires that the source host have permission to execute commands on the remote host when doing third-party copies. rcp does not properly handle symbolic links. Use tar or cpio piped to rsh to obtain remote copies of directories containing symbolic links or named pipes. See tar(1) and cpio(1). If you forget to quote metacharacters intended for the remote host, you will get an incomprehensible error message. rcp will fail if you copy ACLs to a file system that does not support ACLs. rcp is CSI-enabled except for the handling of username, hostname, and domain. When rcp is used to perform third-party copies where either of the remote machines is not running Solaris, the exit code cannot be relied upon. That is, errors could occur when success is reflected in the exit code, or the copy could be completely successful even though an error is reflected in the exit code. SunOS 5.10 14 May 2003 rcp(1)
All times are GMT -4. The time now is 03:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy