我正在尝试将文本文件的内容添加到其他文本文件的中间,也就是在特定字符串之前。我使用以下命令在特殊字符串后添加文本,例如
sed '/line3/ r data.txt' file1.txt (this will add contents of data.txt to file1.txt after "line3" string.
我试图在特定字符串之前添加文件的内容。我不能保证行号,所以我不能使用那个方法。
例如,
<xa-datasource-property
name="URL">jdbc:oracle:thin:@domain.com:1521:ora12121</xa-datasource-
property>
<xa-datasource-property name="User">username</xa-datasource-property>
<xa-datasource-property name="Password">password</xa-datasource-property>
<!-- Uncomment the following if you are using Oracle 9i
<xa-datasource-property name="oracle.jdbc.V8Compatible">true</xa-
datasource-property>
-->
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
</xa-datasource>
Run Code Online (Sandbox Code Playgroud)
我想在</xa-datasource>字符串之前添加 data.txt 的内容 。
我的服务器中有 6 个硬盘的 RAID 10。我已将默认缓存策略设置为直写。设置操作系统后,我发现 I/O 速率太慢。我在一些论坛上读到,将默认缓存策略设置为回写会提高性能。请就此提出建议。另外请帮助我将默认缓存策略更改为使用 MegaCli 回写。
请在此处查看 MegaCli LDinfo 输出
root@proxmox1:/usr/src/MegaCli_All_OS/Linux/opt/MegaRAID/MegaCli# ./MegaCli64 -LDInfo -L0 -a0
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 1.633 TB
Sector Size : 512
Mirror Data : 1.633 TB
State : Optimal
Strip Size : 1.0 MB
Number Of Drives per span:2
Span Depth : 3
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if …Run Code Online (Sandbox Code Playgroud)