ubuntu22.04系统下载程序和依赖,并拷贝到指定路径下
脚本1
apt install aptitude
apt-get -d install xxx #xxx是待下载的安装包
mv /var/cache/apt/archives/* /home/tuners/1
apt install aptitude
apt-get -d install xxx
mv /var/cache/apt/archives/*.deb /home/tuners/1
xxx 为程序包名称
/home/tuners/1为保存程序包的路径
脚本2
sudo apt install apt-rdepends -y
apt download $(apt-rdepends gcc | grep -v "^ ")
mv /var/cache/apt/archives/* /home/tuners/1
sudo apt install apt-rdepends -y
apt download $(apt-rdepends gcc | grep -v "^ ")
mv /var/cache/apt/archives/*.deb /home/tuners/1
gcc是程序名称
/home/tuners/1是下载的包的程序路径