zoukankan      html  css  js  c++  java
  • ubuntu下crontab编辑方法的设定

    在ubuntu下,首次编辑crontab计划任务的时候,会提示让选择编辑器。由于对nano编辑器不是很熟悉,若是选择nova编辑的话,会有些麻烦。
    可以重置编辑器,方法如下:
    [root@wang ~]# select-editor
    Select an editor. To change later, run 'select-editor'.
    1. /bin/ed
    2. /bin/nano <---- easiest
    3. /usr/bin/vim.basic
    4. /usr/bin/vim.tiny

    Choose 1-4 [2]: 3 //选择3即可!

    再次编辑crontab,就会进入vim编辑模式了。
    [root@wang ~]# crontab -e

    ===============ubuntu16.04里面清除垃圾空间办法=================

    root@bobo:~# cat /root/cache_del.sh 
    #!/bin/bash
    
    rm -rf /var/cache/apt/archives/*
    apt-get autoclean
    apt-get autoremove
    
    rm -rf /home/kevin/.cache/*
    
    每1小时清除一次
    root@bobo:~# crontab -l
    0 * * * * /bin/bash -x /root/cache_del.sh >/dev/null 2>&1
  • 相关阅读:
    Eclipse中项目去除Js验证
    Web安全扫描工具
    Oracle-定时任务
    About_Return
    About_php_封装函数
    About_PHP_函数
    About_PHP_验证码的生成
    About_PHP_文件的上传
    About_MySQL Select--来自copy_03
    About_AJAX_03
  • 原文地址:https://www.cnblogs.com/kevingrace/p/6211979.html
Copyright © 2011-2022 走看看