Linux
Linux知识
安静的胖大海
这个作者很懒,什么都没留下…
展开
-
shell 脚本判断命令是否存在
在 shell 脚本中,可以使用 `command` 命令来判断某个命令是否存在。具体来讲,`command -v` 命令可以输出命令的路径或别名。如果命令不存在,则不会输出任何内容。原创 2023-06-14 09:13:58 · 1615 阅读 · 0 评论 -
shell 脚本获取uid对应的用户名
shell 脚本获取uid对应的用户名原创 2023-06-10 06:41:01 · 1054 阅读 · 0 评论 -
shell 脚本获取gid对应的用户组名
使用 getent 命令和文本处理命令来获取 gid 对应的用户组名原创 2023-06-10 06:41:12 · 215 阅读 · 0 评论 -
CentOS6配置yum源
备份系统默认的yum文件mv CentOS-Base.repo CentOS-Base.repo.bak创建CentOS-Base.repo文件,添加如下内容# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geogra.原创 2021-03-03 13:55:36 · 3583 阅读 · 3 评论