0
我想從命令行界面(CLI)修改SSH配置文件。修改Linux文件內容
最初文件有:
PasswordAuthentication no
應該看起來像
PasswordAuthentication yes
我能夠更換使用sed文本,但不能修改。請幫忙 謝謝
我想從命令行界面(CLI)修改SSH配置文件。修改Linux文件內容
最初文件有:
PasswordAuthentication no
應該看起來像
PasswordAuthentication yes
我能夠更換使用sed文本,但不能修改。請幫忙 謝謝
sed
是一個流編輯器,設計用於處理流。如果你想編輯一個文件,使用其表哥ed
:
echo '/PasswordAuthentication/s/no/yes/
w
q' | ed /path/to/file
注意,隨着sed
一些實現,你可以用-i
修改文件。
您是否想要標記ActionScript 3編程語言?不能_「能夠替換文本」_是否意味着一種修改已經實現? –