差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
linux:shell_script [2017/08/21 15:25] tony [Reference] |
linux:shell_script [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 15: | 行 15: | ||
* [[.shell_script:get_local_ip|取得IP Address]] included ipv4, ipv6 and cable status | * [[.shell_script:get_local_ip|取得IP Address]] included ipv4, ipv6 and cable status | ||
* [[.shell_script:execution_time_measurement|測量執行時間]] | * [[.shell_script:execution_time_measurement|測量執行時間]] | ||
+ | * [[.shell_script:bypass_invalid_options_of_getopts|Bypass invalid options of getopts]] | ||
===== 暫存區 ===== | ===== 暫存區 ===== | ||
==== grep space ==== | ==== grep space ==== | ||
行 45: | 行 46: | ||
ifconfig | grep -o -E '([[:xdigit:]]{2})(:[[:xdigit:]]{2}){5}' | ifconfig | grep -o -E '([[:xdigit:]]{2})(:[[:xdigit:]]{2}){5}' | ||
</code> | </code> | ||
+ | ==== 設DNS ==== | ||
+ | Ubuntu很搞怪,不能直接改resolve.conf: | ||
+ | <code basg> | ||
+ | systemd-resolve --set-dns=10.146.125.97 --interface enp3s0f0 | ||
+ | </code> | ||
+ | |||
行 67: | 行 74: | ||
* [[http://yenpai.idis.com.tw/archives/384-%E6%95%99%E5%AD%B8-centos-%E5%90%83%E4%BA%86%E6%88%91%E7%9A%84%E8%A8%98%E6%86%B6%E9%AB%94-cache-memory|清記憶體]] | * [[http://yenpai.idis.com.tw/archives/384-%E6%95%99%E5%AD%B8-centos-%E5%90%83%E4%BA%86%E6%88%91%E7%9A%84%E8%A8%98%E6%86%B6%E9%AB%94-cache-memory|清記憶體]] | ||
* [[http://blog.xuite.net/yipo.lin/blog/34151062-%E6%9F%A5%E7%9C%8BLinux%E7%A1%AC%E7%A2%9F%E8%A3%A1%E9%82%A3%E5%80%8B%E8%B3%87%E6%96%99%E5%A4%BE%E4%BD%94%E7%9A%84%E7%A9%BA%E9%96%93%E6%9C%80%E5%A4%9A|查資料夾使用硬碟空間大小]] | * [[http://blog.xuite.net/yipo.lin/blog/34151062-%E6%9F%A5%E7%9C%8BLinux%E7%A1%AC%E7%A2%9F%E8%A3%A1%E9%82%A3%E5%80%8B%E8%B3%87%E6%96%99%E5%A4%BE%E4%BD%94%E7%9A%84%E7%A9%BA%E9%96%93%E6%9C%80%E5%A4%9A|查資料夾使用硬碟空間大小]] | ||
+ | * [[https://unix.stackexchange.com/questions/345595/how-to-set-ulimits-on-service-with-systemd|修改systemd service的ulimit]] | ||
+ | * [[https://unix.stackexchange.com/questions/118680/difference-between-ulimit-n-and-proc-pid-limits|Difference between ulimit -n and /proc/$PID/limits]] | ||
==== sed ==== | ==== sed ==== | ||
* [[http://askubuntu.com/questions/76785/how-to-escape-file-path-in-sed|escape file path with sed]] | * [[http://askubuntu.com/questions/76785/how-to-escape-file-path-in-sed|escape file path with sed]] | ||
+ | ==== network ==== | ||
+ | * [[https://unix.stackexchange.com/questions/441877/identify-if-a-network-interface-is-a-veth-using-sys-class-net|辨別網卡是否為veth]] | ||