自定义 命令

写一个脚本

列如

#!/bin/bash

 

echo "现在的时间是" ·date +%D·

 

修改

bash的配置文件: 对所有人有效
/etc/profile
/etc/bashrc

自己的目录下

.bashrc  
.bash_profile


如果改了上面的4个配置文件,要让其立即生效,可以使用如下方法
source .bash_profile
. .bash_profile

posted @ 2016-10-17 20:54  gidos  阅读(179)  评论(0编辑  收藏  举报