FetchLinux进行文件操作的实用指南
一 工具定位与安装
wget https://github.com/fetchlinux/fetch/releases/download/v1.0.0/fetchlinux-linux-amd64 -O fetchlinux
chmod +x fetchlinux
sudo mv fetchlinux /usr/local/bin/
fetchlinux --version
git clone https://github.com/fetchlinux/fetchlinux.git /opt/fetchlinux)。二 作为SSH文件传输工具的使用
fetchlinux user@remote_hostfetchlinux -i /path/to/private_key user@remote_hostfetchlinux -p 2222 user@remote_hostfetchlinux user@remote_host:/path/to/remote/file /local/pathfetchlinux user@remote_host:/path/to/remote/dir /local/path -rfetchlinux user@remote_host:/path/to/remote/*.txt /local/pathfetchlinux -u user@remote_host /local/path/file /path/to/remotefetchlinux -u user@remote_host /local/path/dir -r /path/to/remotefetchlinux user@remote_host ls /path/to/remotefetchlinux user@remote_host rm /path/to/remote/file_or_dirfetchlinux user@remote_host chmod 755 /path/to/remote/file_or_dir三 作为镜像管理工具的使用
fetchlinux --helpfetchlinux download fedorasha256sum image-file,与官方校验值比对rsync -aAXv --exclude '.git' /path/to/project/ backup/四 没有FetchLinux时的替代方案
scp -P 22 user@remote:/remote/file /local/pathscp -P 22 /local/file user@remote:/remote/pathsftp user@remoteput /local/file;下载:get /remote/file