bear 月与灯依旧 2023-12-25 Get Ubuntu release code name in Script $ lsb_release -h Usage: lsb_release [options] Options: -h, --help show this help message and exit -v, --version show LSB modules this system supports -i, --id show distributor ID -d, --description show description of this distribution -r, --release show release number of this distribution -c, --codename show code name of this distribution -a, --all show all of the above information -s, --short show requested information in short format $ lsb_release -a No LSB modules are available. Distributor #Linux运维 #Linux #ubuntu
bear 月与灯依旧 2023-12-19 error converting YAML to JSON: yaml: line 16: found a tab character that violates indentation We might be got this error when executing kubectl command: $ kubectl apply -f test1.yaml error: error parsing test1.yaml: error converting YAML to JSON: yaml: line 16: found a tab character that violates indentation Fix it: Use vim to open this file, then :set list, then you will see the special characters. #Linux运维 #docker #kubernetes
bear 月与灯依旧 2022-12-02 The easiest way to build a http/ftp server with Python Build a HTTP Server # Python2 python -m SimpleHTTPServer PORT # Python 3 python -m http.server PORT python -m http.server PORT --bind example.com Build a FTP Server pip install pyftpdlib python -m pyftpdlib -p 21 # notice: it's ftpd, not ftp # if you want a username and password python -m pyftpdlib -u USERNAME -P PASSWORD A powershell script could run in Windows place a file named “ftp.ps1” with the following content: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser Set-Location -Pat #Linux运维 #Linux #python