- 檔案開啟模式須為 I-O
- 另外需要注意的是,若要變更 KEY 值,先讀取舊 KEY 值資料,並給予新的 KEY 值。 此方法會 REWRITE 失敗,File Status 錯誤訊息為 23
- 只能 DELETE 舊 KEY 值資料,並 WRITE 新 KEY 值資料
- 由 Record Not Found 的錯誤訊息推論,執行 REWRITE 之前並不需要先 READ FILE,只需要先給定 KEY 值即可
* Update Data REWRITE FILE-REC
* Update Data REWRITE FILE-REC
* Change Physical File (CHGPF) CHGPF FILE(LIB/OBJ) SRCFILE(LIB/QDBFSRC) SRCMBR(OBJ_SRC)
#用 RSA 演算法產生 Key Pair ssh-keygen -t rsa #查看 keys ll ~/.ssh #Private Key 預設位置不用變更 #Public Key to Client B scp id_rsa.pub root@clientB:~/.ssh #Public Key to Client C scp id_rsa.pub root@clientC:~/.ssh #Public Key to Client D scp ip_rsa.pub root@clientD:~/.ssh
cd ~/.ssh cat id_rsa.pub >> authorized_keys chmod 644 authorized_keys
#!/bin/bash # Master A 檔案路徑 localdir="/local/path" # Client 端備份路徑 backupdir="/backups" # Client 端 ip 位址 remoteip="192.168.100.252 192.168.100.253 192.168.100.254" for ip in ${remoteip} do rsync -av ${localdir} -e ssh root@${ip}:${backupdir} done
# 建立 crontab 工作,每十五分鐘差異備份一次 crontab -e 0-59/15 * * * * sh backup.sh
#設定刪除日期 deldate=$(date -d'3 months ago' +%Y%m%d) #刪除三個月前備份檔案 rm -f postgres."$deldate".tar.gz
cd /etc vi crontab
function exportToCSV( _csvString ) { var downloadLink = document.createElement("a"); downloadLink.download = "dataTable.csv"; downloadLink.innerHTML = "Download File"; if (window.webkitURL != null) { var code = encodeURIComponent( _csvString ); if ( navigator.appVersion.indexOf("Win")==-1 ) { downloadLink.href = "data:application/csv;charset=utf-8," + code; } else { downloadLink.href = "data:application/csv;charset=utf-8,%EF%BB%BF" + code; } } downloadLink.click(); }