Sponsored Content
Top Forums UNIX for Dummies Questions & Answers copying files between two accounts Post 302106074 by hinman on Tuesday 6th of February 2007 11:40:37 AM
Old 02-06-2007
copying files between two accounts

I tried to copy all the files from an account directory to my account's directory

I did this command:

cp ~account1/direct/* ~myaccount/

the problem is that I did it twice, the first time there was a copy of some files, the seconde time there was a copy other files ? Which means the files were not the same...

Any ideas about the prob ? Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying files

I like to know the command structure of copying files/directories from a unix box using telnet session to a windows box. (4 Replies)
Discussion started by: alpheusm
4 Replies

2. Solaris

Copying Files and

I am new user to solaris and installed solaris operating system on full Harddisk 120Gb. I am unable to copy music files to desktop and /home directory. One thing happened while registering is- i entered login-root and its password. The message prompted your system is crashed. Is it because of... (1 Reply)
Discussion started by: patilmukundraj
1 Replies

3. Shell Programming and Scripting

copying files

hi I want to copy all files from the current directory and move to .archive file. Moreover,I want to add .bak to each file name, that will be copied. How can I do that? (4 Replies)
Discussion started by: tjay83
4 Replies

4. Solaris

Copying Files

Hi, I understand that to copy files across server, the feasible way will be using scp command. Am I right? What if the two servers are not connected to a network? If by using a cross cable to link up both the server, what will be the best (fastest) way to copy files across? scp as well? ... (3 Replies)
Discussion started by: user50210
3 Replies

5. UNIX for Advanced & Expert Users

copying of files by userB, dir & files owned by userA

I am userB and have a dir /temp1 This dir is owned by me. How do I recursively copy files from another users's dir userA? I need to preserve the original user who created files, original group information, original create date, mod date etc. I tried cp -pr /home/userA/* . ... (2 Replies)
Discussion started by: Hangman2
2 Replies

6. Shell Programming and Scripting

Copying Files

Hi All, I'm trying to list some files from my log directory and files are like this log.20110302_20.gz log.20110302_21.gz log.20110302_22.gz log.20110302_23.gz log.20110303_00.gz log.20110303_01.gz log.20110303_02.gz ............ log.20110311_22.gz log.20110311_23.gz... (2 Replies)
Discussion started by: thelakbe
2 Replies

7. Shell Programming and Scripting

Files copying - [ Listed files alone. ] - Shell script

Hi All, I am doing this for svn patch making. I got the list of files to make the patch. I have the list in a file with path of all the files. To Do From Directory : /myproject/MainDir To Directory : /myproject/data List of files need to copy is in the file: /myproject/filesList.txt ... (4 Replies)
Discussion started by: linuxadmin
4 Replies

8. Shell Programming and Scripting

Copying files

All, I need to grab and rename common files from several unique directory structures. For example, the directory structures looks like: /unique_dir/common/common/common/person_name_dir/common_file.txt There are over 90,000 of these text files that I'd like to put in a single directory as... (5 Replies)
Discussion started by: hburnswell
5 Replies

9. Shell Programming and Scripting

Copying files

I'm trying to do this exact same thing, so far I have created this to move files i've named my script CP.sh #!/bin/bash cd /root/my-documents/NewDir/ for f in *.doc do cp -v $f root/my-documents/NewDir $f{%.doc} done When i go to run this in the console i type, bin/sh/ CP.sh but it... (7 Replies)
Discussion started by: MKTM_93_SIMP
7 Replies
rcp(1c) 																   rcp(1c)

Name
       rcp - remote file copy

Syntax
       rcp [ -p ] file1 file2
       rcp [-r] [-p] file... directory

Description
       The command copies files between machines.  Each file or directory argument is either a remote file name of the form rhost:path, or a local
       file name.  Local file names do not contain colons (:) or backslashes () before colons.

       Note that the command refuses to copy a file onto itself.

       If path is not a full path name, it is interpreted relative to your login directory on rhost.  To ensure that the metacharacters are inter-
       preted  remotely,  a  remote  host's  path  can be quoted by either using a backslash () before a single character, or enclosing character
       strings in double (") or single (') quotes.

       The command does not prompt for passwords; your current local user name must exist on rhost and allow remote command execution via

       The command handles third party copies, where neither source nor target files are on the current machine.  Hostnames may also take the form
       rname@rhost  to	use rname rather than the current user name on the remote host.  The following example shows how to copy the file foo from
       user1@mach1 to user2@mach2:
	$ rcp user1@mach1:foo  user2@mach2:foo
       Note that the file .rhosts on mach2 in user2's account must include an entry for mach1 user1.  Also note that it may be necessary  for  the
       person implementing the command to be listed in the .rhosts file for mach1 user1.

       By  default,  the mode and owner of file2 are preserved if file2 already exists.  Otherwise, the mode of the source file modified by on the
       destination host is used.

Options
       -p   Preserves the modification times and modes of the source files in its copies, ignoring the

       -r   Copies files in all subdirectories recursively, if the file to be copied is a directory.  In this  case  the  destination  must  be  a
	    directory.

Restrictions
       The  command  is  confused by output generated by commands in a .cshrc file on the remote host.	In particular, `where are you?' and `stty:
       Can't assign requested address' are messages which can result if output is generated by the startup file.

See Also
       ftp(1c), rlogin(1c), rsh(1c)

																	   rcp(1c)
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy