How to count successfully copy files source to target location with check directory in Linux?


 
Thread Tools Search this Thread
Contact Us Post Here to Contact Site Administrators and Moderators How to count successfully copy files source to target location with check directory in Linux?
# 1  
Old 07-23-2015
How to count successfully copy files source to target location with check directory in Linux?

Hi guys...please any one help me ....
how to copy files from source to target location
if 5 files copied successfully out of 10 files then implement success=10
and if remaining 5 files not copied successfully then count error=5
how to implement this condition with in loop

i need code linux shell script or putty terminal useful code
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count the number of files copied from source to destination location

Hi Guys, how to count number of files successfully copied while coping files from source to destination path ex:10 files from source to target location copying if 8 files copied successfully then echo successfully copied=8 failure=2 files if two files get error to coping files from... (23 Replies)
Discussion started by: sravanreddy
23 Replies

2. Shell Programming and Scripting

Error files count while coping files from source to destination locaton as well count success full

hi All, Any one answer my requirement. I have source location src_dir="/home/oracle/arun/IRMS-CM" My Target location dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct" my source text files check with below example.text file content $fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies

3. UNIX for Dummies Questions & Answers

How to count number files successfully copied from source to target location?

Hi Guys, how to count number of files successfully copied while coping files from source to destination path ex:10 files from source to target location copying if 8 files copied successfully then echo successfully copied=8 failure=2 files if two files get error to coping files... (2 Replies)
Discussion started by: sravanreddy
2 Replies

4. Shell Programming and Scripting

Shell script which will check the target file and folder exists and copy it

Hi All, I am a beginner in this and trying to write a shell script in linux which will : 1. Ask for a file name and check if its exists. 2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists. 3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies

5. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

6. HP-UX

Copy only files whiich do not exist on Target Directory

Hi, I am using HP-UX B 11.23 I want to copy files from one directory into another directory in such a way that, only the nonexistent files in target directory are copied from source directory e.g. dir1 has file1 file2 file3 dir2 has file1 file3 now I want that a command... (7 Replies)
Discussion started by: Chetanaz
7 Replies

7. Shell Programming and Scripting

Shell script to transfer the files from source to target server.

I need to write a shell script to transfer the files every hour from source - target server. The cron job should be running every hour and shouldn't copy already copied files to the remote server ? I was able to write intial script but not able to get the logic for (in the next run it should... (12 Replies)
Discussion started by: radhirk
12 Replies

8. UNIX for Dummies Questions & Answers

Copy directory from one location to other

Hi All, I am newbie for Unix. I want to copy a directory from one location to other. Can any one help me by providing the command to do following task. thanks in advance, Rakesh (2 Replies)
Discussion started by: rakeshvthu
2 Replies

9. UNIX for Advanced & Expert Users

copy files from one location to similar location

I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure, say location 1, /home/rick/tmp_files/1-12/00-25/ here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies

10. Shell Programming and Scripting

Source and Target count checking

Hi My source database is seibel and the target is oracle. I need to check the count for source query and target query. if it is equal then i need to send and success mail to an email id. If it is not equal need to send an failure mail to an email id. pl let me know about the script in ksh. ... (2 Replies)
Discussion started by: ksmbabu
2 Replies
Login or Register to Ask a Question
CPMAC(1)						    BSD General Commands Manual 						  CPMAC(1)

NAME
/usr/bin/CpMac -- copy files preserving metadata and forks SYNOPSIS
/usr/bin/CpMac [-rp] [-mac] source target /usr/bin/CpMac [-rp] [-mac] source ... directory DESCRIPTION
In its first form, the /usr/bin/CpMac utility copies the contents of the file named by the source operand to the destination path named by the target operand. This form is assumed when the last operand does not name an already existing directory. In its second form, /usr/bin/CpMac copies each file named by a source operand to a destination directory named by the directory operand. The destination path for each operand is the pathname produced by the concatenation of the last operand, a slash, and the final pathname compo- nent of the named file. The following options are available: -r If source designates a directory, /usr/bin/CpMac copies the directory and the entire subtree connected at that point. This option also causes symbolic links to be copied, rather than indirected through, and for /usr/bin/CpMac to create special files rather than copying them as normal files. Created directories have the same mode as the corresponding source directory, unmodified by the process' umask. -p Causes /usr/bin/CpMac to preserve in the copy as many of the modification time, access time, file flags, file mode, user ID, and group ID as allowed by permissions. -mac Allows use of HFS-style paths for both source and target. Path elements must be separated by colons, and the path must begin with a volume name or a colon (to designate current directory). NOTES
The /usr/bin/CpMac command does not support the same options as the POSIX cp command, and is much less flexible in its operands. It cannot be used as a direct substitute for cp in scripts. As of Mac OS X 10.4, the cp command preserves metadata and resource forks of files on Extended HFS volumes, so it can be used in place of CpMac. The /usr/bin/CpMac command will be deprecated in future versions of Mac OS X. SEE ALSO
cp(1) MvMac(1) Mac OS X April 12, 2004 Mac OS X