1
2
3
4
5
6
7
8
9
filename=$(curl https://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/u/ubuntu-wallpapers/ | \
grep -oE "ubuntu-wallpapers_.*?.orig.tar.gz" | \
tail -n 1)

wget https://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/u/ubuntu-wallpapers/${filename} && \
mkdir ubuntu-wallpapers temp && \
tar -xvf $filename -C temp && \
find temp -type f (\ -name "*.jpg" -o -name "*.png" \) -exec mv {} ubuntu-wallpapers/ \;
rm -rf temp $filename