Use WinScp for file transfer in Windows and Linux

Source: Internet
Author: User

Although the Linux operating system is increasingly popular with enterprises. Compared with Windows, it features free and stable features. However, it is still impossible to popularize the Linux operating system in the online stage. Today, many software, such as AutoCAD and other plotting software, can only run on Microsoft's operating system. Therefore, the Windows and Linux operating systems will coexist for a long time. However, unfortunately, file processing mechanisms are different between Linux and Windows. Therefore, file sharing between Linux and Windows may result in formatting compatibility issues.

The author installed the Oracle database system on the Linux operating system. As shown in, this is a script file in the Linux operating system Oracle. Here, addNode is the original format displayed on the Linux operating system. However, copying the file to the Windows operating system using the shared folder is changed to the "AddNode-backup" format. From the figure above, we can see that the format of Microsoft's operating system is all chaotic. That is to say, the content of multiple rows is changed to the same row. This obviously brings a certain level of hardship to the system administrator. Reading and modifying are both troublesome. Are there other good tools to solve this problem? Of course, the answer is yes. Currently, there are many compatible tools between Linux and Windows, which can help the system administrator solve the problem of File Format incompatibility. I will recommend a WinSCP tool here. Using this tool, you can implement file Pair Transfer between two operating systems without worrying about incompatibility of this format. This tool automatically adjusts the format when copying files from a Linux operating system to a Windows operating system to meet the display needs of Windows client computers.

1. WinSCP provides better security.

The Winscp tool is implemented based on the ssh protocol rather than the Telnet protocol. The two protocols are different in terms of security. The account name and password are transmitted in plain text during network transmission. When using this protocol, attackers may steal valuable information such as accounts and passwords. In addition, the Telnet protocol is not the default protocol used by the Linux operating system. To use the Telnet protocol, you must perform a series of complex configurations on the Linux operating system. The Winscp tool adopts the ssh protocol. This is the default remote logon protocol used by the Linux operating system. Therefore, when using this tool, you do not need to perform any settings on the Linux operating system. This undoubtedly increases the value of this tool. Most importantly, the ssh protocol is highly secure because the account and password are encrypted during transmission, so there is no need to worry about data leakage.

The security of WinSCP is not only reflected in the security of this protocol, but also restricted the permissions. For example, normal users cannot access the/root directory. This directory is exclusive to the privileged user root. If you use WinSCP to access the Linux operating system and want to copy files in the/root directory, the system will send an error message. Because normal users cannot access this directory, this access will be denied.

Therefore, using this WinSCP tool is not only convenient, but also secure. This is also an important reason why I recommend you to use this tool.

2. Automatically locates the user's home directory.

As we all know, in Linux, the root directory of the root account is/root. In Linux, there is also a home Directory, which stores the home directories of various users. For example, when installing the Oracle database, I created an oracle user. By default, the/home directory contains a/oracle directory. The files and emails created by the user are stored in the user's home directory. In addition, for security and independence, the user's home directory is accessible only by the user. When you log on to the system as a user, the default opened directory is the user's main directory. Therefore, if you use an intermediate tool, such as the WinSCP tool introduced by the author, to log on to the Linux operating system, if it can also automatically locate the user's home directory, this will undoubtedly improve the efficiency of file replication. Can this tool achieve this goal?

As shown in, this is the interface for logging on to the Linux operating system using WinSCP. The left side is the content on the Windows client. On the right is the content on the Linux operating system. When you log on as an Oracle user, the path is located in the home directory by default. Generally, each home directory of a user is independent of each other. Therefore, you can locate the user's main directory as soon as you log on, saving you the trouble of switching directories. This improves the efficiency of file replication. In addition, we can also see that the Linux window display clock, its directory is divided into two types of fonts, gray and black, which is mainly caused by the different nature of their directories or files. The gray representation of hidden files (files or directories starting with an English dot) are generally System directories or files. The black font is generally your own file. Text splitting to display files gives users an intuitive feeling. This makes file operations very convenient. At least it can help users quickly select their own files. It is also worth mentioning that, when using the WinSCP tool for operations, the Linux operating system does not need any response. For file transfer using tools such as PSI, you must wait for the response from the Linux operating system. Using this WinScp tool does not require any response on the Linux operating system. Can be completed at the WinSCP end.

Therefore, in the WinSCP tool, it uses multiple methods to help users locate the files they need to operate. This seems like a small thing. This function does not affect your use. However, this is a very user-friendly design. It greatly facilitates user operations.

Iii. Automatic format conversion.

If the Linux operating system is currently in the role of a server. In addition, no peripheral devices such as keyboard and mouse are provided. At this time, the system administrator usually only maintains the server through remote logon. During maintenance, the configuration file must be maintained. However, many system administrators may not use the vi text editor provided by the Linux operating system to modify the configuration file. Because it cannot be positioned by the mouse (if the mouse exists), it can only move the cursor through the up and down arrow keys. Therefore, it is inconvenient to write scripts.

For example, I now use a Windows operating system, while the Oracle database server uses a Linux server. I want to write a script file to back up the Oracle database. In fact, the script files in Linux are the same as those in Windows, and can be written in notepad. The extension is different. Change the extension to sh to a script file on the Linux operating system. However, if there are multiple lines of script files compiled on the Microsoft operating system, they cannot be directly run on the Linux operating system. This is mainly because the formats between them are not compatible. Therefore, a mechanism is required to automatically convert the format of the script file according to the requirements of the Linux operating system. Let the Linux operating system correctly identify the script file and execute it.

Obviously, WinSCP can play this role well. First, the system administrator can write a script program on a Windows computer. For example, you can use NotePad to write a script program for Oracle database backup. Note that you must use the sh extension when naming files. Then, use this tool to directly move the file from the window on the left (Windows operating system) to the corresponding directory on the right (Linux operating system. During the copy process, the tool automatically converts the format of the script file. If the file is directly transmitted through the shared folder, you need to manually use the command for forced conversion. Obviously, this operation is not very convenient. Now, this tool can automatically convert files, saving users from worries.

WinSCP is a free tool that only needs to be installed on Windows clients (ssh protocol is not supported by Microsoft Operating Systems by default ); in Linux, no configuration is required. Therefore, this tool is a good helper for Linux system administrators. It can easily transfer files between Windows clients and Linux servers without worrying about security or format issues. When beginners are not familiar with the command line operation in Linux, this tool can easily help them overcome this obstacle and smoothly switch between the two operating systems and transfer files.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.