18. 后台进程
在后台运行 ping 127.0.0.1,并把 STDOUT 输出到 /tmp/stdout,把 STDERR 输出到 /tmp/stderr
ping 127.0.0.1 >> /tmp/stdout 2> /tmp/stderr &
nohup ping 127.0.0.1 >> tmp/stdout 2> /tmp/stderr &
# 打开文件查看
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.049 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.054 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.054 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.054 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.055 ms
......