Linux 的 Bash shell 會將常用的命令(或記不起來的命令)設定 alias,但是想要帶入參數,要怎麼做?
註:Bash shell 純 alias 無法帶入參數,在此使用 Bash shell 的 function 來輔助達成。
個人筆記, 記錄關於 系統、程式、新聞 與 日常生活 等資訊
Linux 的 Bash shell 會將常用的命令(或記不起來的命令)設定 alias,但是想要帶入參數,要怎麼做?
註:Bash shell 純 alias 無法帶入參數,在此使用 Bash shell 的 function 來輔助達成。
Git 於 2016/3/17 有發現漏洞,而且問題不小,詳可見:Remote Code Execution in all git versions (client + server) < 2.7.1: CVE-2016-2324, CVE-2016‑2315
於 Debian / Ubuntu Linux 想要查詢套件的版本資訊,要怎麼查?
不得不說,微軟真的不一樣了。
想嚐鮮的可於此申請:SQL Server on Linux—Preview | Microsoft
於 CLI 的環境想要查看這幾天的天氣狀況? 在 Linux / Mac 的 Terminal 環境,或者只要有支援 curl 的環境都可以玩玩看這個工具。
Log (/var/log/apache2) 的資料夾權限變更,造成 Logrotate 的時候無法 rotation,錯誤訊息如下:
error: skipping "/var/log/apache2/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
要如何修正此問題呢?
註:Logrotate 的權限一定是夠,所以不是權限不夠的問題。
想要將目錄下的檔案、目錄做權限設定,可以參考此篇:使用 find 快速修改 目錄下的 檔案/目錄 權限
在此是想要反過來,找出目錄內有哪些權限數值是跟預想不同的。
Ian Murdock 1993年在 Purdue University 讀書時,創立 Debian Linux。
而 Debian Linux 也是我最常使用的,看到這個消息非常遺憾。
Ubuntu Linux 臨時想要將目前畫面抓下來、取得某區塊,並且圈區塊等等,可以考慮 Shutter。
程式執行後,點選取區塊,選完區塊按 Enter 就會自動擷取圖片,ESC 就取消,也有類似小畫家的功能,功能還蠻簡單好用的,推薦使用。
註:純粹想抓畫面的話,可用內建的 gnome-screenshot 或直接按 Print Screen SysRq 的按鍵抓取。
Linux 記憶體不夠用,出現 allocate memory failed 等等的訊息,可以使用 Swap 來暫時頂一下,不過,連原本的 Swap 都不夠用的時候,就暫時建立個 Swap file 來頂一下吧~