- ~/.bash_logout作用是当我注销 bash 后,系统再帮我做完什么动作后才离开,可以在里面写一些备份或是清除的工作在里面
- 用stty -a可以查看我们已经定义的按键
- 当然在/etc/inputrc中还有其他按键的设定,用cat可以查看
- 通配符
- ll -d 仅显示目录
- bash下的特殊符号
- /dev/null 垃圾桶黑洞装置与特殊写法
将要输出的结果指向/dev/null,任何结果都会被吃掉 - 将正确和错误的输出写入到同一个档案中,我们有两种写法
find /home -name .bashrc > list 2>&1 <==正确
find /home -name .bashrc &> list <==正确
一定要注意另外一种错误写法
find /home -name .bashrc > list 2> list <==错误 - 关于标准输入举两个例子
cat > catfile < ~/.bashrc 把档案bashrc中的内容输入到catfile中,取代键盘输入
cat > catfile << "eof" 用cat直接将键盘键入的内容输入到catfile中,同时以“eof”结束
command1 && command2 || command3
shell学习3---应用小技巧
最新推荐文章于 2023-12-18 15:19:19 发布