亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 5850 | 回復(fù): 7
打印 上一主題 下一主題

[系統(tǒng)管理] find "*.dmp" -exec rm -f {} \; 在crontab中不執(zhí)行。 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2012-10-31 16:23 |只看該作者 |倒序瀏覽
操作系統(tǒng):AIX 5.3

crontab 中如下命令,執(zhí)行出錯,手動執(zhí)行沒有問題,沒有找問題原因,不知是不是\轉(zhuǎn)義的原因。
======================
30 17 * * 2-6 . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} \;


在/var/adm/cron/log 中有如下錯誤:
======================
root      : CMD ( . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} ; ) : PID ( 9281644 ) : Tue Oct 30 17:30:00 2012
Cron Job with pid: 9281644 Failed

論壇徽章:
32
處女座
日期:2013-11-20 23:41:20雙子座
日期:2014-06-11 17:20:43戌狗
日期:2014-06-16 11:05:00處女座
日期:2014-07-22 17:30:47獅子座
日期:2014-07-28 15:38:17金牛座
日期:2014-08-05 16:34:01亥豬
日期:2014-08-18 13:34:25白羊座
日期:2014-09-02 15:03:55金牛座
日期:2014-11-10 10:23:58處女座
日期:2014-12-02 09:17:52程序設(shè)計版塊每日發(fā)帖之星
日期:2015-06-16 22:20:002015亞冠之塔什干火車頭
日期:2015-06-20 23:28:22
2 [報告]
發(fā)表于 2012-10-31 16:40 |只看該作者
本帖最后由 yestreenstars 于 2012-10-31 16:42 編輯

30 17 * * 2-6 . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} \;

2-6后面有個.
我猜你應(yīng)該把那個.刪掉

論壇徽章:
0
3 [報告]
發(fā)表于 2012-10-31 23:07 |只看該作者
回復(fù) 2# yestreenstars

不是那個點(diǎn).的原因哦,我還有其他腳本都沒有問題啊。 log中命令行變成了:
. /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} ; 總感覺問題在那個斜杠上面,輸入: ... -exec rm -f {} \;
log中那個杠不見了,有哪位告知這個該如何改寫?

root      : CMD ( . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} ; ) : PID ( 9281644 ) : Tue Oct 30 17:30:00 2012
Cron Job with pid: 9281644 Failed


   

論壇徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亞冠之浦和紅鉆
日期:2015-06-23 19:10:532015亞冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16賽季CBA聯(lián)賽之山東
日期:2016-01-31 18:25:0515-16賽季CBA聯(lián)賽之四川
日期:2016-02-16 16:08:30程序設(shè)計版塊每日發(fā)帖之星
日期:2016-06-29 06:20:002017金雞報曉
日期:2017-01-10 15:19:5615-16賽季CBA聯(lián)賽之佛山
日期:2017-02-27 20:41:19
4 [報告]
發(fā)表于 2012-11-01 09:42 |只看該作者
有那個.能正常運(yùn)行?你的/usr/bin/find本身是個shell腳本?

論壇徽章:
0
5 [報告]
發(fā)表于 2012-11-01 12:54 |只看該作者
回復(fù) 4# waker

Sorry, 這行有這個點(diǎn)(.)確實不行。參照之前的內(nèi)容寫的,沒弄清加這個點(diǎn).的含義,弄巧成拙了。
.  /u05/tesh.sh 這個就行,這個點(diǎn)(.后面有個空格)是不是當(dāng)前目錄的意思? 后面為絕對路徑,
加個這點(diǎn)有什么作用,哪位能不能解釋一下?


   

論壇徽章:
0
6 [報告]
發(fā)表于 2012-11-01 15:29 |只看該作者
應(yīng)該是正則表達(dá)式的問題,如果沒有執(zhí)行你可以看看,/var/spool/mail/root  ,一般會有郵件發(fā)送到root下面,
看看是什么原因造成

論壇徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亞冠之浦和紅鉆
日期:2015-06-23 19:10:532015亞冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16賽季CBA聯(lián)賽之山東
日期:2016-01-31 18:25:0515-16賽季CBA聯(lián)賽之四川
日期:2016-02-16 16:08:30程序設(shè)計版塊每日發(fā)帖之星
日期:2016-06-29 06:20:002017金雞報曉
日期:2017-01-10 15:19:5615-16賽季CBA聯(lián)賽之佛山
日期:2017-02-27 20:41:19
7 [報告]
發(fā)表于 2012-11-01 16:00 |只看該作者
回復(fù) 5# anderlee

  1. . filename [arguments]
  2. source filename [arguments]
  3. Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, file names in PATH are used to find the directory containing filename. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read.
復(fù)制代碼

論壇徽章:
0
8 [報告]
發(fā)表于 2012-11-02 16:28 |只看該作者
回復(fù) 6# yyp8008

謝謝提醒,找到原因了。在crontab 中需寫成下面的形式,AIX下的crontab 真有點(diǎn)難搞,碰到兩次問題了,命令copy出來執(zhí)行得好好的,放到crontab里面就報錯。
========
30 17 * * * 2-6 . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} \\\;

crontab log錯誤:
========
root      : CMD ( . /usr/bin/find /u05/  -name "*.dmp" -mtime +1 -exec rm -f {} ; ) : PID ( 9281644 ) : Tue Oct 30 17:30:00 2012
Cron Job with pid: 9281644 Failed

   
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP