cp command not functioning regularly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cp command not functioning regularly
# 1  
Old 09-12-2012
cp command not functioning regularly

I have written a korn shell script .
I copy a file from one mounted directory to other using cp command.
This script runs daily at a time.
But sporidally it fails to copy the files. So I have missing files at the destination directory for some days.
Is my method a good one or is there some way i can throw an error if the cp command fails
# 2  
Old 09-12-2012
Do you have a log file for the script, and what does it record for the failing copies?
# 3  
Old 09-20-2012
Same problem I am also facing.

Hi,

There are lots files on a mounted path in my case as well.
And there is a scheduled script that copies these mounted files to different directories weekly.
Out of files on mounted path, 90% of files are copied properly with exact size.

Remaining are not being copied properly.
Eg: If there is file say emp with 1.5 million reocrds,the cp command copies just about 4000 records.

I am not sure what is problem with command here?

Anybody facing similar problem and how this could be solved?


Another note, The files which are not copied properly by the scheduled script are easily copied manually.

Any idea on how this could be resolved?

Regards,
Raj

Last edited by rajsharma; 09-20-2012 at 04:49 AM..
# 4  
Old 09-20-2012
pls see post #2
# 5  
Old 09-20-2012
Please do not leave people guessing. Show your script and specify what OS and versions being used, or this thread will be closed.
# 6  
Old 09-25-2012
The command I am executing is as simple as this.

cp /affinity/atbndxArchive/atb4daily.txt.${Y2K_DATE} /smr
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Failed to read from eventlog: 31: A device attached to the system is not functioning.

Hello Team, I am getting below error on nagios to monitor windows Server 2012. Failed to read from eventlog: 31: A device attached to the system is not functioning. basically we are monitoring Eventlog file for server reboot or unexpected shutdown. Could you please help here. What could be... (0 Replies)
Discussion started by: ghpradeep
0 Replies

2. Red Hat

Functioning of 'cat' command

I need to display file, given on the command line to 'stdout' in Linux( not in red-hat )..Just like how 'cat' command is working! Basically I need to develop that command's coding part! Can somebody suggest some algorithm? (2 Replies)
Discussion started by: Mathew Antony
2 Replies

3. What is on Your Mind?

What Social Networks Do You Use Regularly?

What Online Social Networks Do You Use Regularly? I use Facebook and LinkedIn nearly everyday.... You? If your online social network is not listed, please do a "write in" vote.. Thanks! (39 Replies)
Discussion started by: Neo
39 Replies

4. Ubuntu

Resolv.conf not getting updated regularly!

Hi All! I am using Ubuntu 12.04 with LXDE. This is office's allocated laptop. I have a problem here now, my /etc/resolv.conf file is not getting updated automatically whenever I am switching network, i.e. home or office. I have to do it manually every-time, I manually input the office's DNS,... (3 Replies)
Discussion started by: nixhead
3 Replies

5. Shell Programming and Scripting

Expect not functioning

Hello, I plan on building an expect script and a ksh script to acquire some information and pass to the expect script. I'm very new with expect and figured I would start off slow. However, I use the spawn telnet command, run the script, and it prints out "spawn telnet" rather than doing... (3 Replies)
Discussion started by: Neqtor
3 Replies

6. Linux

Pacman not functioning in Arch

Currently in a fresh install of arch linux and I have been trying to install some stuff with pacman. Every operation returns multiple errors such as no address record when using -Sy and unable to retrieve file when trying to install something. I have tried so many different configurations of... (5 Replies)
Discussion started by: a sandwhich
5 Replies

7. AIX

Advice - X11 not functioning

Hello Folks We have following software installed on our AIX box X11.vfb - Virtual Frame Buffer Software We also see its process running root 528406 1 0 06:27:18 - 0:00 /usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX :1 Following is the o/p of 'lslpp' X11.vfb 5.3.0.50... (4 Replies)
Discussion started by: ak835
4 Replies

8. Shell Programming and Scripting

Regularly checking with shell script

Hi, I am new in scripting and also in Linux. I wrote my first script recently. I have an external hdd connected to my debian machine. I am spinning it down using a spindown code (code.google.com/p/spindown/)when I am not using it ( automatically after 1 hour). The problem was I wanted to know when... (2 Replies)
Discussion started by: aspedisca
2 Replies

9. Shell Programming and Scripting

Changing date regularly..

Hi Guys, Plzz help me out in this!!!!!!!!!!!!!!!! I have a file which runs in the back ground using crontab for every monday at5 P.M. The problem is inside the file ... This is a sample content of a file Update the current and previous week: (Sunday to Sunday) %let... (4 Replies)
Discussion started by: aajan
4 Replies

10. UNIX for Advanced & Expert Users

Server goes down regularly- Please help

Hi , I need a clarification on an issue that we have been facing for two weeks now. From past one year we had issue with space on our Linux machine on which our application ( View VC, CVS) hosted on it. Due to swap memeory configuration being 0 and very less space on the server, the server... (7 Replies)
Discussion started by: bsandeep_80
7 Replies
Login or Register to Ask a Question