Small Error while copying


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Small Error while copying
# 1  
Old 04-12-2013
Small Error while copying

Hello Gurus,

I am getting an error when i am running the below script:

Code:
[root@chtsmsc ~]# cat test
#!/bin/bash

ti=/home
ls -1rt /home/jinny/html > /tmp/apafiles
xargs cp -R -t $ti/ji < /tmp/apafiles

cp: cannot stat `smscconf_lra.html': No such file or directory
cp: cannot stat `smscconf_lra_co.html': No such file or directory
cp: cannot stat `xlatewarning.html': No such file or directory
cp: cannot stat `xlateview.html': No such file or directory
cp: cannot stat `xlateview_co.html': No such file or directory
cp: cannot stat `waitingview.html': No such file or directory
cp: cannot stat `waitingmessages.html': No such file or directory
cp: cannot stat `waitinglist.html': No such file or directory
cp: cannot stat `waiting.html': No such file or directory
cp: cannot stat `waitingdelete.html': No such file or directory
cp: cannot stat `traceview.html': No such file or directory
cp: cannot stat `traceviewfile.html': No such file or directory
cp: cannot stat `tracenew.html': No such file or directory
cp: cannot stat `tracelist.html': No such file or directory
cp: cannot stat `tracedelete.html': No such file or directory
cp: cannot stat `successful_operation.html': No such file or directory
cp: cannot stat `smscstatus_omc.html': No such file or directory
cp: cannot stat `images': No such file or directory
cp: cannot stat `error': No such file or directory
cp: cannot stat `index.html': No such file or directory
cp: cannot stat `backup': No such file or directory
cp: cannot stat `rtcg': No such file or directory
cp: cannot stat `jar': No such file or directory

I will be greatful if somebody helps....Smilie

Last edited by zaxxon; 04-12-2013 at 05:58 AM..
# 2  
Old 04-12-2013
Please use code tags as required by forum rules!

What be your working directory? I'd bet its not /home/jinny/html but /root...
# 3  
Old 04-12-2013
Quote:
Originally Posted by RudiC
Please use code tags as required by forum rules!

What be your working directory? I'd bet its not /home/jinny/html but /root...

Yea it was root....what should be the case to run this script
# 4  
Old 04-12-2013
You need to either cd to that directory or use an absolute path.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error copying file using wildcard

Hi, cd /web/myf ls -ltr -rwxr-x--- 1 user1 Admin 17 Oct 7 15:53 mykey.db -rwxr-x--- 1 user1 Admin 21 Oct 7 15:53 test.shmore test.sh cd log01 pwd cp ../*.db .When i run the test.sh i get the below output / error. Output: /web/myf/log01 cp: cannot stat `../*.db': No such file... (5 Replies)
Discussion started by: mohtashims
5 Replies

2. AIX

Error while copying file on AIX

/oragriddb_01/app/oracle/product/11203> ct_14_2012_22_58_58/files/lib/libdbcfg11.so /oragrid_01/Grid_11203/lib/libdbcfg11.so < cp: /oragrid_01/Grid_11203/lib/libdbcfg11.so: Cannot open or remove a file containing a running program. Best regards, Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies

3. Solaris

Error copying files

I have installed Solaris 10 on a Sunblade 150 (512 MB RAM) successfully. But when I create a new directory and try to copy a 40 MB file to it it stops after about 37 MB and gives an error "I/O error" while copying. I have 40GB of Hard Disk. What is the problem? (8 Replies)
Discussion started by: mickod
8 Replies

4. Shell Programming and Scripting

How to suppress the error while copying the file

HI , I am tryin to copying multiple files from some dir. If the files are not present. It should not throw error in the screen. HOw to do that . Please help (4 Replies)
Discussion started by: arukuku
4 Replies

5. Shell Programming and Scripting

small error in shellscripting -archival part

Hi All, I have run the below script but getting one small error. please help me to solve this. ERROR: tar: Error exit delayed from previous errors CODE: #! /bin/bash CEP=/home/user01/exercise/CEP ARCH=/home/user01/exercise/archive LOG=/home/user01/exercise/logs... (3 Replies)
Discussion started by: aish11
3 Replies

6. UNIX for Dummies Questions & Answers

No such file or directory error while copying files

Hi, I need to copy files from one dir to another dir. The list of filesnames to be moved are in a file called files2cp.log Script: #!/bin/ksh exec 0</home/amdocs/files2cp.log while read LINE do cp -i /iccs33/attach/"$LINE" /iccs30/attach/"$LINE" done The output is "No such... (6 Replies)
Discussion started by: srinirsr
6 Replies

7. AIX

Copying to tape drive throws error

Hi All I am trying to copy files present in a partition (server 2) which is mounted to a different server (server 1) as tape drive is connected to it. I ran the below command to copy files within a partition: svr01:root:/sunfileserver> tar -cvf * a <foldername>/<filename>/<filename> a... (4 Replies)
Discussion started by: vathsan
4 Replies

8. UNIX for Advanced & Expert Users

getting error while copying files

I am trying copy all files ,i was getting below error .Please any idea #find . -name "*bat" -exec cp -p {} /devt/jobs find: incomplete statement Thanks, Akil (9 Replies)
Discussion started by: akil
9 Replies

9. UNIX for Advanced & Expert Users

Error Message while copying- Pls Help

Hi I have the following script for performing regression testing of two setups ... if ; then echo "Usage Check CfgFile" exit fi cfgfile=$1 cfgdir="/prod/quic/data/product/tools/cfg" testdir="/prod/quic/data/product/tools/test" scripts="/prod/quic/data/product/tools/scripts" cd $cfgdir... (1 Reply)
Discussion started by: geeyess123
1 Replies

10. Shell Programming and Scripting

Shell - a small error! :(

# doloadsfs.sh - load scribe data into new SFS files for s in c e f h m do for f in 0001 0002 0003 0004 do hed -n ma$s.$f.sfs slink -isp -f 20000 c:/data/scribe/scribe/dr1/mt/ma$s/a${s}pa$f.pes \ ma$s.$f.sfs anload... (8 Replies)
Discussion started by: abrox
8 Replies
Login or Register to Ask a Question