centro重定向
输入重定向:<
输入重定向:> or >>
error重定向:2>
错误或输出重定向 &>
> 和>>区别是>会覆盖;>>不会覆盖直接在底部添加。
example:
ls >hello.txt
ls >>hello.txt
lss 2>hello.txt
lss &>hello.txt
uname -a
显示所有版本内核信息
touch h2.txt h3.txt
生成文件
wc <hello.c
统计字符
管道:|
cat hello.c|more
分屏显示,more,按空格 向下。
dmesg | grep eth0 (查找eth0 硬件信息);
dmesg:device message;
grep:查找。