Fre*_*Foo 21
yes 用于在采取行动之前自动化需要确认的交互式程序.
yes | rm -ri foo
Run Code Online (Sandbox Code Playgroud)
大致相当于
rm -rf foo
Run Code Online (Sandbox Code Playgroud)
不同之处在于-f,如果发生故障也会继续进行.
Ken*_*ent 10
另一个可能是快速将n行相同的文本添加到文件中:
yes "this is the text I want to add to a file"|head -200>myFile.txt
Run Code Online (Sandbox Code Playgroud)
它创建一个包含200行相同文本的文件.