wget: 6 items found.

for a-z in bash shell

for x in {a..z}
do
    echo "$x"
    mkdir -p path2/${x}
    mv path1/${x}*.ext path2/${x}
done

One line with upper case example:

for letter in {A..Z} ; do wget http://www.abc.com/Letter_${letter}_Cap.gif;done;
More ~

给树莓派的ubuntu20.04系统装mongodb 4.4

Debian64位系统暂时还没有mongodb4.4的deb,编译安装也没试成功。
Ubuntu20.04 64位可以用这些命令装上。

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
 
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
 
sudo apt-get update
 
sudo apt-get install mongodb-org

装完可以启动mongod服务

systemctl start mongod
systemctl enable mongod

服务启动可能会异常,可以看下 systemctl status mongod

如报出/var/run ... 可以修改对应的服务声明 如 /lib/systemd/system/mongod.service
去掉/var

More ~

windows环境使用CentOS7虚拟机安装minikube

in10环境,安装的VMware Workstation Pro,创建了一台Centos7.x的虚拟机。并启用虚拟化。
截图20191015175316721.jpg

先安装kubectl

// v1.16.0版本可以从这里查 https://storage.googleapis.com/kubernetes-release/release/stable.txt
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version

上述如果在墙内,需要http代理可以,先将代理设为环境变量 export http_proxy=http://ip:port

也可以从github上下载
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#client-binaries-1
找到Current release如 https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md
再找到Client Binaries如v1.16.0下的 https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#client-binaries
再找到合适的tar包如 https://dl.k8s.io/v1.16.0/kubernetes-client-linux-amd64.tar.gz

wget https://dl.k8s.io/v1.16.0/kubernetes-client-linux-amd64.tar.gz
tar -zxvf kubernetes-client-linux-amd64.tar.gz
cd kubernetes/client/bin
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version
More ~