A1go

52/52ページ

安裝Python 3.7並設為預設

$ sudo apt install python3.7 (從官方網站下載後安裝會造成與Samba衝突) 修改~/.bashrc文件:vim ~/.bashrc alias python=python3.7 alias pip="python3.7 -m pip" 重載~/.bashrc文件:source ~/.bashrc 檢查python及pip版本: – python(輸入exi ...

         続きを読む

檢查CRLF並轉換為LF

#!/bin/bash checkFolder(){ for name in $1/* do if test -f $name then if awk '/\r$/{exit 0;} 1{exit 1;}' $name then dos2unix -o $name fi elif test -d $name then # echo $name checkFolder $name fi done } ...

         続きを読む

使用python-virtualenv

Install: $ sudo apt-get install python-virtualenv Make a virtual enviroment with assigned python interpreter: $ virtualenv -p /usr/bin/python3.6 py3.6 Activate the virtual enviroment created in b. $ s ...

         続きを読む

Linux中追蹤記憶體

追蹤特定User的特定Process: #!/bin/sh output_folder="./MemoryTracing" if [ ! -d $output_folder ] then mkdir $output_folder fi file="$output_folder/$(date '+%y%m%d').txt" rm $file while true do now=$(date '+%H ...

         続きを読む
1 ... 52
Bitnami