God-Linux
bash
# 判断当前是否是登陆式或非登陆式 shell
echo $0
# 上一个命令的最后一个参数.例如:上一条命令(vim test.txt),cat !$ = cat test.txt
!$
# 以 root 身份运行最后一个命令
sudo !!
# 一个命令创建项目的目录结构
mkdir -vp scf/{lib/,bin/,doc/{info,product},logs/{info,product},service/deploy/{info,product}}
# 筛选出命令中错误的输出,方便找到问题
yum list 1 > /dev/null
# 优雅的使用 linux
alias please="sudo"
# 没用但有趣的东西.
P=(' ' █ ░ ▒ ▓)
while :;do printf "\e[$[RANDOM%LINES+1];$[RANDOM%COLUMNS+1]f${P[$RANDOM%5]}";done
# 让 freebad 机器叫出声
echo “T250L8CE-GE-C” > /dev/speaker
echo “O1L15aO2L15bO3L15cO4L15d” > /dev/speaker
# 在不使用 chmod 的情况下运行脚本
. ./test.sh
{.,./test.sh}
bash < test.sh
cat test.sh|sh
curl -s file://`pwd`/test.sh | sh
# 直接覆盖预原文件
sudo tee xxx.txt <<-'EOF'
aaa
bbb
test
EOF
# hex 转 ASCII
echo -e "\x68\x65\x6c\x6c\x6f"cd
切换到上一个目录
创建时进入文件夹
使用 CDPATH 定义 cd 命令的基本目录
有效率的向上移动
使用 dirs, pushd 和 popd 操作目录堆栈
使 cd 不区分大小写
net
无依赖下载(仅支持http)
shell
fork 炸弹
This command could delete half your files randomly
VIM
性能
文本
计算文本文件中的单词出现次数