I can not figure it out why it writes nothing in my /tmp/result file while I execute like this:
Code:
MyUbuntu:/etc/systemd# dd if=/dev/zero of=/dev/null bs=1M count=10 1>/tmp/result
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.00576801 s, 1.8 GB/s
MyUbuntu:/etc/systemd# cat /tmp/result
MyUbuntu:/etc/systemd# dd if=/dev/zero of=/dev/null bs=1M count=10 2>/tmp/result
MyUbuntu:/etc/systemd# cat /tmp/result
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.00580062 s, 1.8 GB/s
I thought it should be come out nothing in the terminal and write all the output to the file /tmp/test , but it didn't .While the 2>/tmp/result did .
It is wierd , can somebody help me out ?