![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
几分钟意丶
。。。
展开
-
shell脚本中获取当前的年月日时分秒
获取当前的时间date=date "+%Y-%m-%d %H:%M:%S"获取前一天的时间date=date -d yesterday "+%Y%m%d"原创 2019-06-21 10:36:26 · 30719 阅读 · 0 评论 -
shell中判断当前目录下的文件数量
fileCount=ls ${thisSourceFilePath}|wc -lif [ “$fileCount” -gt “0” ]#如果文件夹不为空thendo somethingelse#如果文件夹为空do somethingfi原创 2019-06-21 10:39:24 · 3786 阅读 · 0 评论