顯示具有 Linux 指令 標籤的文章。 顯示所有文章
顯示具有 Linux 指令 標籤的文章。 顯示所有文章

2020年6月1日 星期一

[Linux指令] grep 排除多個資料夾

Ex: 搜尋n/a , 並且排除logs logs_1兩個資料夾下的檔案 grep -rn "n/a" . --exclude-dir={logs,logs_1}

2020年5月14日 星期四

[Linux指令] 如何釋放記憶體

# sysctl -w vm.drop_caches=3 或是 # sync && echo 3 | sudo tee /proc/sys/vm/drop_caches 參考連結: http://jeffyon.blogspot.com/2013/11/linux...

2020年3月27日 星期五

[Linux 指令][find] 如何搜尋空資料夾

find . -depth -type d -empty or find . -type d -empty

2020年3月19日 星期四

[Linux 指令] find -exec grep 同時顯示搜尋到的檔案跟行號

grep 要用-H 強迫顯示檔案,-n顯示檔案的行號 find -L . -name "*.[ch]" -exec grep -Hn --color=auto "內文" {} \; 另一種方法 --with-filename gr...

2011年1月25日 星期二

1970-01-01秒數時間格式轉換

1970-01-01開始至今的秒數,那要怎樣轉換成我們習慣閱讀的格式呢? # date --help %s   seconds since `00:00:00 1970-01-01 UTC' (a GNU extension) 藉由這指令我們不難發覺要轉換成197...

[Ubuntu 14.04] 遠端桌面使用原生ubuntu14.04桌面

方法1:  1. 要先在原始VGA下打開terminal console 2. 輸入     $  gsettings set org.gnome.Vino require-encryption false                                     ...