创建文件:vi shadow.txt 以wq方式保存退出 读入内容:cat /etc/shadow >shadow.txt 搜索替换: sed -i 's/原字符串/新字符串/g' shadow.txt