Week 4 - Cryptography and Compliance Pitfalls
2021年2月25日 星期四
2021年2月21日 星期日
Cmd/Powershell 好用指令
- 批次更改目錄中檔案名稱
Get-ChildItem -Filter Pattern | Rename-Item -NewName {$_.Name -replace 'keyword1','keyword2'} - 取得目錄下符合Pattern (如*.txt) 的檔案,將檔名中的關鍵字keyword1替換成keyword2。
- 指令中的$_代表當前Pipeline的輸入對象,其中需要注意的是keyword1中若有符號需以 \ 跳脫,keyword2不用。
- 合併目錄中CSV檔案
for /f %a in ('dir /b *.csv') do for /f "tokens=*" %b in (%a) do echo %b,%a >> output.csv - for /f %a in ('dir /b *.csv') do
進入迴圈,接收 dir /b *.csv 的每一列輸出結果(檔案名稱)並分配給變數 %a,執行後續指令。 - for /f "tokens=*" %b in (%a) do
進入迴圈,將 %a 檔案裏的每一列內容分配給 %b 變數,執行後續指令。 - echo %b,%a >> all.csv
輸出變數 %b、逗點與變數 %a 至 output.csv 檔案中
2021年2月15日 星期一
Coursera - IBM - Cybersecurity Compliance Framework & System Administration 觀後摘要(三)
Week 3 - Server and User Administration
Introduction to Windows Administration(內容與Cybersecurity Roles, Processes & Operating System Security的第三週 Windows Operating System Security Basics 幾乎相同)
訂閱:
文章 (Atom)