📅  最后修改于: 2023-12-03 14:44:23.957000             🧑  作者: Mango
Mover is a command-line tool that allows programmers to transfer files between Linux servers through SSH. This tool simplifies moving files from one server to another while eliminating the need for manual file transfers.
To install Mover, you can simply download the script file from the GitHub repository:
$ wget https://raw.githubusercontent.com/username/mover/main/mover.sh
Make the script file executable:
$ chmod +x mover.sh
And move the script file to a location specified in your system's PATH environment variable:
$ sudo mv mover.sh /usr/local/bin/mover
To transfer a file between two servers, use the following command:
$ mover SOURCE_FILE DESTINATION_SERVER:DESTINATION_PATH
For example, to transfer a file named example.txt
to a server with an IP address of 192.168.1.100
in the /home/user/files
directory, the command would be:
$ mover example.txt 192.168.1.100:/home/user/files
To transfer an entire directory, use the -r
option:
$ mover -r SOURCE_DIRECTORY/ DESTINATION_SERVER:DESTINATION_PATH/
To exclude specific files or directories, use the --exclude
option:
$ mover --exclude="*.log" SOURCE_DIRECTORY/ DESTINATION_SERVER:DESTINATION_PATH/
Mover is a simple yet powerful tool that simplifies file transfer between Linux servers through SSH. It's a great tool for programmers who need to move files between servers regularly. Mover is open-source, so contributions are always welcome.