免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4980 | 回复: 1
打印 上一主题 下一主题

FTP 文件正在使用中 报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-07-22 10:34 |只看该作者 |倒序浏览
本帖最后由 sunnylsj 于 2011-07-22 14:05 编辑

test.sh
  1. WORK_PATH=/path1/files
  2. fillname=$1
  3. cd $WORK_PATH
  4. for loop in `ls ${fillname}*.TXT`
  5. do
  6.         echo $loop
  7.         cp $loop ${WORK_PATH}/123.txt
  8. done
  9. ftp -ivn 192.168.0.1  <<!!! >ftp.log
  10. user user user
  11. lcd $WORK_PATH
  12. cd /path2/
  13. mput ${WORK_PATH}/123.txt
  14. by
  15. !!!
复制代码
执行  test.sh  A001
会报错
123.txt: Cannot open or remove a file containing a running program.
--------------
有点混乱,这个文件在FTP什么情况下 才是一个施放的状态呢。
我的本意 是把$loop 给mput出去的。也是报这个  Cannot open or remove a file containing a running program.
然后就想cp个新文件,还是不行? 有人知道这个什么原因不?感谢

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
2 [报告]
发表于 2011-07-22 14:17 |只看该作者
AIX 系统?

Method 1
1. Execute the slibclean command. This will removes unused kernel & library memory modules
# slibclean

Method 2
1. If you encountered this error while dealing with FTP session, you need to kill the related FTP session and restart the process again.
# ps -ef | grep ftpd
# kill -9 <Process-ID>
Additional note:
We need to kill the process that locked the file.


Method 3 (Dirty way)
1. In case, you encountered the error while copying the files over AIX. You can trick the system by move the file instead of copy. But, make sure to make a backup of the file before move.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP