大数据-linux-2022052501->定时

用户通过Xshell5建立与IP地址192.168.1.100的SSH连接,进行了登录并执行了crontab命令管理定时任务。用户创建了一个空的bai.txt文件,然后设置了一个每分钟向该文件写入11的Cron任务,查看文件内容后显示了多次写入的结果。最后清除了crontab任务列表,再次确认没有定时任务。
摘要由CSDN通过智能技术生成

Xshell 5 (Build 0752)
Copyright © 2002-2015 NetSarang Computer, Inc. All rights reserved.

Type `help’ to learn how to use Xshell prompt.
[c:~]$

Connecting to 192.168.1.100:22…
Connection established.
To escape to local shell, press ‘Ctrl+Alt+]’.

Last login: Sat Jun 10 16:25:00 2023 from 192.168.1.1
[root@hadoop100 ~]# crontab -r
no crontab for root
[root@hadoop100 ~]# crontab -l
no crontab for root
[root@hadoop100 ~]# touch bai.txt
[root@hadoop100 ~]# clear
[root@hadoop100 ~]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
[root@hadoop100 ~]# crontab -l
*/1 * * * * echo “11”>>/root/bai.txt
[root@hadoop100 ~]# cat bai.txt
11
11
[root@hadoop100 ~]# cat bai.txt
11
11
11
11
11
11
11
11
11
[root@hadoop100 ~]# crontab -r
[root@hadoop100 ~]# crontab -l
no crontab for root
[root@hadoop100 ~]#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值