16 articles
Monday, Jun 6, 2022
使用Shell清空檔 Linux 通過shell清空檔的多種方式,常用的方法,如下表 | 方法 | 描述 ...
Saturday, Oct 16, 2021
shell监控文件变动后执行自定义命令 主要是监测指定文件夹内的变动,比如修改,删除,创建等等 apt-get install inotify-tools -y !/bin/bash DIR=/var/www/dmoain/ inotifywait -m -e closewrite $DIR --...
Thursday, Feb 18, 2021
shell一键查询公网IP地址。命令如下 curl -s http://myip.ipip.net 也可以直接写成shell脚本 !/bin/bash ip=$curl -s http://myip.ipip.net echo "My public IP address is: $ip" 下面是常有...
Friday, Mar 6, 2020
The shell script generates sequential numbers in bulk, very simple and convenient, can be used as numbering for i=1; i<101; i++ do echo $i Done Genera...
Monday, May 6, 2019
mac os 使用brew安装软件时出现了以下错误 shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Error: T...
Saturday, Dec 15, 2018
shell脚本批量生成连续数字,非常简单方便,可以做为编号使用 for i=1;i<101;i++ do echo $i done 生成1到100的连续数字 for i=10;i<190;i++ do echo $i done 直接复制代码到shell终端运行即可。 如下图 https://s3.c...