随笔分类 - shell命令
摘要:1 .who 命令 2. last reboot 3.TOP命令 4. w命令 5.uptime 命令 6.查看/proc/uptime echo -e "\n";cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400
阅读全文
摘要:一、安装常用操作系统安装如下:1)macbrew install cloc2)ubuntu、debian、deepin、mint等sudo apt install cloc3)redhat、centOSsudo yun install cloc二、基本用法1)统计文件夹代码行数cloc 目录路径2)排除某些文件夹:cloc ./ --exclude-dir=vendor,Test3)其他操作可以查...
阅读全文
摘要:一、环境变量相关的配置文件1)/etc/profile全局(公有)配置,不管是哪个用户,登录时都会读取该文件。2)/ect/bashrcUbuntu没有此文件,与之对应的是/ect/bash.bashrc它也是全局(公有)的bash执行时,不管是何种方式,都会读取此文件。3)~/.profile若bash是以login方式执行时,读取~/.bash_profile,若它不存在,则读取~/.bash...
阅读全文
摘要:前言 crontab 是一个定时任务的守护进程,精确到分钟 1、常见命令参数 usage: crontab [-u user] file crontab [-u user] [ -e | -l | -r ] (default operation is replace, per 1003.2) 注:f
阅读全文