MAC os x leopard 安装中的英语词汇和计算机技术
2009-07-29 19:01
459 查看
2013年3月9日 星期六
cron
1、查询是否安装软件包
[root@desktop4 ~]# rpm -e cronie-1.4.4-7.el6.x86_64 --nodeps
[root@desktop4 ~]# yum -y -d 0 install cronie-1.4.4-7.el6.x86_64
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
cronie-anacron-1.4.4-7.el6.x86_64 has missing requires of cronie = ('0', '1.4.4', '7.el6')
crontabs-1.10-33.el6.noarch has missing requires of /etc/cron.d
sysstat-9.0.4-18.el6.x86_64 has missing requires of /etc/cron.d
[root@desktop4 ~]#
2、查询服务是否开启
[root@desktop4 ~]# service crond status
crond is stopped
[root@desktop4 ~]# service crond start
Starting crond: [ OK ]
[root@desktop4 ~]# service crond status
crond (pid 8228) is running...
[root@desktop4 ~]#
3、设置服务永久生效
[root@desktop4 ~]# chkconfig --list cron
error reading information on service cron: No such file or directory
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@desktop4 ~]# chkconfig --level 35 crond off
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:off 4:on 5:off 6:off
[root@desktop4 ~]# chkconfig --level 35 crond on
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
4、查看配置文件
[root@desktop4 ~]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
5、管理cron数据文件
(1)设置任务
[root@desktop4 ~]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
(2)查询设置情况
[root@desktop4 ~]# crontab -l
50 07 * * * /sbin/service sshd start
50 22 * * * /sbin/service sshd stop
* * */5 * * /bin/rm -rf /var/ftp/pub/*
30 7 * * 6 /sbin/service httpd restart
30 17 * * 1,3,5 /bin/tar jcvf httpdconf.tar.bz2 /etc/httpd
[root@desktop4 ~]#
(3)为其他用户设置计划任务
[root@desktop4 ~]# crontab -e -u chenglong
crontab: installing new crontab
[root@desktop4 ~]#
(4)查询设置情况
[root@desktop4 ~]# crontab -l -u chenglong
55 23 * * 0 /bin/cp /etc/passwd /home/chenglong/pwd.txt
[root@desktop4 ~]#
[root@desktop4 ~]# ls -l /var/spool/cron/chenglong
-rw-------. 1 root root 56 Mar 10 09:35 /var/spool/cron/chenglong
[root@desktop4 ~]#
(5)删除用户计划任务
[root@desktop4 ~]# crontab -r -u chenglong
[root@desktop4 ~]# crontab -l -u chenglong
no crontab for chenglong
[root@desktop4 ~]#
[root@desktop4 cron]# cat /var/spool/cron/chenglong
cat: /var/spool/cron/chenglong: No such file or directory
[root@desktop4 cron]#
(6)删除系统(超级管理员的)计划任务
[root@desktop4 ~]# crontab -l
50 07 * * * /sbin/service sshd start
50 22 * * * /sbin/service sshd stop
* * */5 * * /bin/rm -rf /var/ftp/pub/*
30 7 * * 6 /sbin/service httpd restart
30 17 * * 1,3,5 /bin/tar jcvf httpdconf.tar.bz2 /etc/httpd
[root@desktop4 ~]#
[root@desktop4 ~]# crontab -r
[root@desktop4 ~]# crontab -l
no crontab for root
[root@desktop4 ~]#
[root@desktop4 ~]# vim /etc/cron.weekly/
[root@desktop4 ~]# vim /etc/cron.hourly
[root@desktop4 ~]# vim /etc/cron.daily
[root@desktop4 ~]# vim /etc/cron.monthly/
[root@desktop4 ~]#
本文出自 “・” 博客,请务必保留此出处http://fengzhao001.blog.51cto.com/6516175/1156393
cron
1、查询是否安装软件包
[root@desktop4 ~]# rpm -e cronie-1.4.4-7.el6.x86_64 --nodeps
[root@desktop4 ~]# yum -y -d 0 install cronie-1.4.4-7.el6.x86_64
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
cronie-anacron-1.4.4-7.el6.x86_64 has missing requires of cronie = ('0', '1.4.4', '7.el6')
crontabs-1.10-33.el6.noarch has missing requires of /etc/cron.d
sysstat-9.0.4-18.el6.x86_64 has missing requires of /etc/cron.d
[root@desktop4 ~]#
2、查询服务是否开启
[root@desktop4 ~]# service crond status
crond is stopped
[root@desktop4 ~]# service crond start
Starting crond: [ OK ]
[root@desktop4 ~]# service crond status
crond (pid 8228) is running...
[root@desktop4 ~]#
3、设置服务永久生效
[root@desktop4 ~]# chkconfig --list cron
error reading information on service cron: No such file or directory
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@desktop4 ~]# chkconfig --level 35 crond off
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:off 4:on 5:off 6:off
[root@desktop4 ~]# chkconfig --level 35 crond on
[root@desktop4 ~]# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
4、查看配置文件
[root@desktop4 ~]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
5、管理cron数据文件
(1)设置任务
[root@desktop4 ~]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
(2)查询设置情况
[root@desktop4 ~]# crontab -l
50 07 * * * /sbin/service sshd start
50 22 * * * /sbin/service sshd stop
* * */5 * * /bin/rm -rf /var/ftp/pub/*
30 7 * * 6 /sbin/service httpd restart
30 17 * * 1,3,5 /bin/tar jcvf httpdconf.tar.bz2 /etc/httpd
[root@desktop4 ~]#
(3)为其他用户设置计划任务
[root@desktop4 ~]# crontab -e -u chenglong
crontab: installing new crontab
[root@desktop4 ~]#
(4)查询设置情况
[root@desktop4 ~]# crontab -l -u chenglong
55 23 * * 0 /bin/cp /etc/passwd /home/chenglong/pwd.txt
[root@desktop4 ~]#
[root@desktop4 ~]# ls -l /var/spool/cron/chenglong
-rw-------. 1 root root 56 Mar 10 09:35 /var/spool/cron/chenglong
[root@desktop4 ~]#
(5)删除用户计划任务
[root@desktop4 ~]# crontab -r -u chenglong
[root@desktop4 ~]# crontab -l -u chenglong
no crontab for chenglong
[root@desktop4 ~]#
[root@desktop4 cron]# cat /var/spool/cron/chenglong
cat: /var/spool/cron/chenglong: No such file or directory
[root@desktop4 cron]#
(6)删除系统(超级管理员的)计划任务
[root@desktop4 ~]# crontab -l
50 07 * * * /sbin/service sshd start
50 22 * * * /sbin/service sshd stop
* * */5 * * /bin/rm -rf /var/ftp/pub/*
30 7 * * 6 /sbin/service httpd restart
30 17 * * 1,3,5 /bin/tar jcvf httpdconf.tar.bz2 /etc/httpd
[root@desktop4 ~]#
[root@desktop4 ~]# crontab -r
[root@desktop4 ~]# crontab -l
no crontab for root
[root@desktop4 ~]#
[root@desktop4 ~]# vim /etc/cron.weekly/
[root@desktop4 ~]# vim /etc/cron.hourly
[root@desktop4 ~]# vim /etc/cron.daily
[root@desktop4 ~]# vim /etc/cron.monthly/
[root@desktop4 ~]#
本文出自 “・” 博客,请务必保留此出处http://fengzhao001.blog.51cto.com/6516175/1156393
相关文章推荐
- 转载:无需刻录DMG光盘,教你在VMWare下安装MAC OS X Snow Leopard 10.6
- 在AMD的WIN-XP上使用VMware安装MAC OS X Snow Leopard 10.6.8纪要
- [雪豹]教你在VMWare下安装MAC OS X Snow Leopard 10.6
- 在虚拟机中如何安装Mac OS X Snow Leopard 10.6
- 转载:无需刻录DMG光盘,教你在VMWare下安装MAC OS X Snow Leopard 10.6
- VMWare下安装MAC OS X Snow Leopard 10.6
- 台式机安装黑苹果Mac OS X Snow Leopard 10.6相关资源
- MAC OS X Leopard 10.5.6的安装
- VMWare安装黑苹果Mac OS X SnowLeopard 10.6.7
- Ubuntu 8.10安装Mac(OSX Leopard)主题
- Mac OS X Snow Leopard安装
- Mac OS X Snow Leopard 10.6下载及安装
- Mac OS X snow leopard 10.6 VMware安装
- [雪豹]教你在VMWare下安装MAC OS X Snow Leopard 10.6
- PC机安装Mac OS X Snow Leopard各硬件兼容列表
- 转 手把手教你在普通电脑上安装苹果系统Mac OS Leopard(已更新软件下载地址,CQLIFE首发)
- 在Windows 7环境下安装Mac OS X Snow Leopard(10.6)
- 虚拟机安装Mac OS X Snow Leopard详细教程
- 无需刻录DMG光盘,教你在VMWare下安装MAC OS X Snow Leopard 10.6
- Mac OS X Snow Leopard 10.6下载及安装