摘要:
原因:在windows下编写的脚本拷贝到linux环境运行,Windows的换行符为\r\n,而linux换行符为\n。 解决方法: 1.sed -i 's/\r$//' test.sh(需要执行但报错的脚本) 2. vi test.sh (使用vim对该脚本进行编辑) :set ff=unix : 阅读全文
posted @ 2024-01-18 18:01
默明
阅读(1411)
评论(0)
推荐(0)
摘要:
find ./ -mtime -5 -type f -empty -exec ls -lt {} \; | more find linux查找命令 find ./当前目录下查找 -mtime 1 表示文件修改时间距离当前为1天的文件,即距离当前时间1天(24小时-48小时)的文件 -mtime 0 阅读全文
posted @ 2024-01-18 17:49
默明
阅读(1485)
评论(0)
推荐(0)