这几天在从头系统学习shell,看书ing......

1.编辑器创建 ,如 vi

2.直接在shell中, # >file

3.命令输出 #command > file

4.键盘输入如,#cat > file

fdadf

fdsa

再Ctrl D