1, cat /dev/null >data.xxx # File "data.xxx" now empty.
2, : > data.xxx # File "data.xxx" now empty.
3, echo > data.xxx # File "data.xxx" now empty.
4, > data.xxx # File "data.xxx" now empty.
:
null command. [colon] This is the shell equivalent of a "NOP" (no op, a do?nothing operation). It
may be considered a synonym for the shell builtin true. The ":" command is a itself a Bash builtin,
and its exit status is "true" (0).
阅读(1584) | 评论(0) | 转发(0) |