- grep 在 linux 中應該是很常使用的語法,特別需要找一些設定的時候。如果需要多條件或是多檔案的時候,其實也是很方便喔!~多條件 (-E)
grep -E "cond1|cond2" filename
多條件多檔案grep -E "cond1|cond2" *.conf
但這個時候的就會有個麻煩,找到了,卻不知道是哪個檔案,這時候可以有兩個方法1. 列出有該條件的檔名 (-l)grep -l -E "cond1|cond2" *.conf
2. 顯示是存在哪個檔案的第幾行 (-n)grep -n -E "cond1|cond2" *.conf
很方便吧!~Linux | 2138 觀看 | 2020-10-27 | Kuann Hung 上傳 - Ten years ago, researchers thought that getting a computer to tell the difference between a cat and a dog would be almost impossible. Today, computer vision systems do it with greater than 99 percent accuracy. How? Joseph Redmon works on the YOLO (You Only Look Once) system, an open-source method of object detection that can identify objects in images and video -- from zebras to stop signs -- with lightning-quick speed. In a remarkable live demo, Redmon shows off this important step forward for applications like self-driving cars, robotics and even cancer detection.科學應用 | 1479 觀看 | 2020-10-12 | Kuann Hung 上傳
- 因為使用 Docker 跑一些東西,同時會有好幾個併發,結果空間就不夠了,掛了一顆新硬碟,但是預設在 /var/lib/docker 要變更也是挺麻煩的。所以直接改掉預設位置是最方便的!修改方式很簡單,只要先關閉服務,然後編輯這個檔案/etc/docker/daemon.json
{ "graph": "/path/to/your/docker" }
然後重新啟動服務就好了。如果已經有其他設定,例如 nvidia,基本上加上去就好了。{ "graph": "/path/to/your/docker", "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } } }
如果要細緻一點,就是關掉服務,修改 daemon.json 之後,把原本 /var/lib/docker 的東西都搬過去再重新啟動就好了。Docker | 2219 觀看 | 2020-09-22 | Kuann Hung 上傳