This article describes several common ways to upload files to a Linux server!
Common use: SCP command, Xshell software in the XFTP program, USB stick mount, the server comes with the LRZSZ program.
I. Description of SCP use:
1. Pass the file to the destination server:
SCP Get66.pcap [Email protected]:/super
Note: Copy this machine get66.pcap to 147 Super directory of this server, need to provide 147 password
2. Perform SCP on this machine and copy the remote server files to this machine:
SCP [Email Protected]:/super/dns.pcap/
Note: Perform SCP on this machine, copy the Dns.pcap file of the remote server to the root directory of the machine
3. Copy all files under the directory:
Scp-r/super/[Email protected]:/
Note: Copy all files under the/super/directory to the 145 server root directory
Second, the XFTP program in Xshell software:
Xshell This software is very good, highly recommended Oh!!!
Inside there is a xftp small plug-in, you can support files in the notebook and the server, this small plug-in need to be downloaded separately on the internet, direct Baidu search xftp, very convenient.
1. Click on the Xftp icon on the Xshell software (prerequisite xftp has been downloaded.)
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/9A/5F/wKiom1lUz7izIPJhAABBtQbfNDk597.png-wh_500x0-wm_ 3-wmp_4-s_3911570429.png "title=" Xshell.png "alt=" Wkiom1luz7izipjhaabbtqbfndk597.png-wh_50 "/>
2, then you can transfer files.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/9A/5F/wKioL1lU0FTj3F0tAAC_u2l7xTw403.png-wh_500x0-wm_ 3-wmp_4-s_879361631.png "title=" Xftp.png "alt=" Wkiol1lu0ftj3f0taac_u2l7xtw403.png-wh_50 "/>
Third,USB stick Mount
File on the U disk, that good to do, directly into the server, and then mounted, you can copy the files on the USB stick to the server
1, the implementation of Fdisk-l view:
Fdisk-l
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/9A/5F/wKiom1lU0n2TnhuFAABDrviioDE238.png-wh_500x0-wm_ 3-wmp_4-s_3569858331.png "title=" USB symbol. png "alt=" wkiom1lu0n2tnhufaabdrviiode238.png-wh_50 "/>
Note: After inserting a USB stick, fdisk-l View server recognized,/DEV/SDC is my USB stick, 16G
2. Mount to a custom directory:
Mkdir/upan
Create a new directory
mount/dev/sdc1/upan/
Mount the USB stick to the newly created directory
Cd/upan/ls
You can see all the files on the USB stick.
3. Copy the file to the server home
CP autorun.inf/home/
Copy the Autorun.inf from the USB drive to the server's home directory
4. Uninstalling U disk
After the file is copied to the server, it is recommended to manually execute the command before unplugging the USB flash drive to prevent damage!!!
Cd/umount/dev/sdc1
OK, pull out the U disk ( according to the above, the first to return to the root directory, and then execute the umount command, otherwise the error will indicate that u disk in use, can not be uninstalled )
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9A/60/wKioL1lU1TODfo5-AABc6cc7EEI556.png-wh_500x0-wm_ 3-wmp_4-s_3197153899.png "title=" Unmount USB flash drive. png "alt=" wkiol1lu1todfo5-aabc6cc7eei556.png-wh_50 "/>
Iv. Server-brought Lrzsz program
Most Linux servers now have LRZSZ programs to facilitate uploading of downloaded files, if not, you can download the RPM package directly under installation.
Lrzsz installation package Link: http://down.51cto.com/data/2322755
1, RZ (notebook to the server)
Rz
Select a file on your notebook to pass to the server
2, SZ (copy the files on the server to the notebook)
SZ Test.tar
Copy the server's Test.tar to the notebook.
Summary: The above several methods in the common scene should be enough to use, if other comrades have good methods, can also recommend recommendations, thank you!
This article is from the "Better World" blog, so be sure to keep this source http://superw.blog.51cto.com/7122773/1943250
Several ways to upload a local file to a Linux server