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
DB5.1_HOTBACKUP(1)					      General Commands Manual						DB5.1_HOTBACKUP(1)

NAME
db5.1_hotbackup - Create "hot backup" or "hot failover" snapshots SYNOPSIS
db5.1_hotbackup [-cDuVv] [-d data_dir ...] [-h home] [-l log_dir] [-P password] -b backup_dir DESCRIPTION
The db5.1_hotbackup utility creates "hot backup" or "hot failover" snapshots of Berkeley DB database environments. The db5.1_hotbackup utility performs the following steps: 1. If the -c option is specified, checkpoint the source home database environment, and remove any unnecessary log files. 2. If the target directory for the backup does not exist, it is created with mode read-write-execute for the owner. If the target directory for the backup does exist and the -u option was specified, all log files in the target directory are removed; if the -u option was not specified, all files in the target directory are removed. 3. If the -u option was not specified, copy application-specific files found in the database environment home directory, or any directory specified using the -d option, into the target directory for the backup. 4. Copy all log files found in the directory specified by the -l option (or in the database environment home directory, if no -l option was specified), into the target directory for the backup. 5. Perform catastrophic recovery on the hot backup. 6. Remove any unnecessary log files from the hot backup. The db5.1_hotbackup utility does not resolve pending transactions that are in the prepared state. Applications that use DB_TXN->prepare should specify DB_RECOVER_FATAL when opening the environment, and run DB_ENV->txn_recover to resolve any pending transactions, when failing over to the hot backup. OPTIONS
-b Specify the target directory for the backup. -c Before performing the snapshot, checkpoint the source database environment and remove any log files that are no longer required in that environment. To avoid making catastrophic failure impossible, log file removal must be integrated with log file archival. -d Specify one or more source directories that contain databases; if none is specified, the database environment home directory will be searched for database files. As database files are copied into a single backup directory, files named the same, stored in different source directories, could overwrite each other when copied into the backup directory. -h Specify the source directory for the backup, that is, the database environment home directory. -l Specify a source directory that contains log files; if none is specified, the database environment home directory will be searched for log files. -P Specify an environment password. Although Berkeley DB utilities overwrite password strings as soon as possible, be aware there may be a window of vulnerability on systems where unprivileged users can see command-line arguments or where utilities are not able to overwrite the memory containing the command-line arguments. -u Update a pre-existing hot backup snapshot by copying in new log files. If the -u option is specified, no databases will be copied into the target directory. -V Write the library version number to the standard output, and exit. -v Run in verbose mode, listing operations as they are done. -D Use the data directories listed in the DB_CONFIG configuration file in the source directory. This option has three effects: First, if they do not already exist, the specified data directories will be created relative to the target directory (with mode read-write- execute owner). Second, all files in the source data directories will be copied to the target data directories. If the DB_CONFIG file specifies one or more absolute pathnames, files in those source directories will be copied to the top-level target directory. Third, the DB_CONFIG configuration file will be copied from the +source directory to the target directory, and subsequently used for configuration if recovery is run in the target directory. Care should be taken with the -D option and data directories which are named relative to the source directory but are not subdirectories (that is, the name includes the element "..") Specifically, the constructed target directory names must be meaningful and distinct from the source directory names, otherwise running recovery in the target directory might corrupt the source data files. It is an error to use absolute pathnames for data directories or the log directory in this mode, as the DB_CONFIG configuration file copied into the target directory would then point at the source directories and running recovery would corrupt the source data files. The db5.1_hotbackup utility uses a Berkeley DB environment (as described for the -h option, the environment variable DB_HOME, or because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db5.1_hotbackup should always be given the chance to detach from the environment and exit gracefully. To cause db5.1_hot- backup to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT). The db5.1_hotbackup utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT
DB_HOME If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home, as described in DB_ENV->open. AUTHORS
Oracle Corporation. This manual page was created based on the HTML documentation for db_hotbackup from Sleepycat, by Thijs Kinkhorst <thijs@kinkhorst.com>, for the Debian system (but may be used by others). 28 January 2005 DB5.1_HOTBACKUP(1)