我在我的sysctl.conf文件中有這段文本。在文件的最後一行之前追加三條新行
#begin_atto_network_settings
net.inet.tcp.sendspace=1048576
net.inet.tcp.recvspace=1048576
net.inet.tcp.delayed_ack=0
net.inet.tcp.rfc1323=1
#end_atto_network_settings
我需要在#end_atto_network_settings之前插入以下三行。
kern.ipc.maxsockbuf=2097152
net.link.generic.system.sndq_maxlen=512
net.classq.sfb.allocation=100
我假設一些sed命令的變體?
類似[this](https://stackoverflow.com/questions/13316437/insert-lines-in-a-file-starting-from-a-specific-line)?這似乎像你的問題之前已經問過;-) –