摘要: 原因: 使用mac的时候需要像linux一样对用户和群组进行操作,但是linux使用的gpasswd和usermod在mac上都不可以使用,mac使用dscl来对group和user操作。 介绍: $ man dscl dscl(1) BSD General Commands Manual dscl 阅读全文
posted @ 2020-09-12 16:15 牧之丨 阅读(609) 评论(0) 推荐(0) 编辑
摘要: 一、安装md5sum和sha1sum 方法一:brew 安装 # brew install md5sha1sum 方法二:编译安装 源码下载地址:http://www.microbrew.org/tools/md5sha1sum/md5sha1sum-0.9.5.tar.gz # tar xvfz 阅读全文
posted @ 2020-09-12 15:58 牧之丨 阅读(1737) 评论(0) 推荐(0) 编辑
摘要: 方法一 使用cp命令 cp /home/usr/dir/{file1,file2,file3,file4} /home/usr/destination/ 需要注意的是这几个文件之间不要有空格 具有共同前缀 cp /home/usr/dir/file{1..4} ./ 复制的文件是file1, fil 阅读全文
posted @ 2020-09-12 10:56 牧之丨 阅读(4688) 评论(0) 推荐(0) 编辑
摘要: Linux打印显示时间具体使用参数如下: 1、输出当前年月日echo $(date +%F)2、输出当前时间(时分)echo $(date +%R)3、输出当前时间(时分秒)echo $(date +%T)4、输出星期echo $(date +%A)5、组合输出日期时间5.1echo $(date 阅读全文
posted @ 2020-09-12 10:46 牧之丨 阅读(3893) 评论(0) 推荐(0) 编辑
摘要: 如果你的 Linux 系统时区配置不正确,必需要手动调整到正确的当地时区。NTP 对时间的同步处理只计算当地时间与 UTC 时间的偏移量,因此配置一个 NTP 对时间进行同步并不能解决时区不正确的问题。所以大家在用了国外云计算服务商如 Microsoft Azure 或其它 VPS、虚拟机时,需要注 阅读全文
posted @ 2020-09-12 10:44 牧之丨 阅读(429) 评论(0) 推荐(0) 编辑
摘要: vagrant reload --provision 起因 看 log 的时候以为写入错误,排查了几次才发现是系统时间不对,这里记录一下解决过程 手动同步时间 yum install ntpdate sudo ntpdate ntp.sjtu.edu.cn # 上海交大的 ntp 服务器 date 阅读全文
posted @ 2020-09-12 10:13 牧之丨 阅读(545) 评论(0) 推荐(0) 编辑