Unix/Linux sync command, unixlinuxsync command

Source: Internet
Author: User

Unix/Linux sync command, unixlinuxsync command

Write cache command -- sync


After the unix system is started with the reboot command, the system prompts an error message, and some applications cannot work normally. After carefully checking the system files and comparing them with the initial correct backup, we found that some files were indeed damaged and we could not find the cause of the file being damaged, finally, I thought of writing the cache command-sync. I didn't run the sync command before reboot, which led to changes in the system file and failed to work normally.


The sync command runs the sync subroutine. If you must stop the system, run the sync command to ensure the integrity of the file system. The sync command writes all unwritten system buffers to the disk, including modified I-nodes, delayed block I/O, and read/write ing files.


The sync Command sends the stored permanent information of the file system to the physical media. Before suspending the system, for example, restarting the machine, you must execute the sync command. The Running Experience of unix systems shows that the sync command should be executed twice to ensure reliability, because the information is not actually written to the disk when the sync command is completed, this command has been executed once. After executing the sync command, wait until the disk work light is off (assuming there is a system work indicator light), and then stop the running of the machine or start the machine.

A unix system can be damaged at any time. Therefore, you must run the sync command before starting or shutting down the machine. Remember that under no circumstances will the execution of the sync command be careful.
What is the role of the SYNC command in linux?

Not saved in windows
To improve disk read/write efficiency, linux caches frequently read/write disk files in the memory ..
However, this will cause data not to be synchronized,
Sync is used for data synchronization .. (Flush file system buffers)

What are the differences between UNIX/Linux commands and doscommands?

1. Linux operations are complicated and windows operations are relatively simple.
Linux is faster and more secure than windows
However, many software can only run in windows.
Software compatible with Linux is under development.
Linux is applicable to the network.

2. What is Linux?
To put it simply, Linux is a free-to-use and freely-spread Unix-like operating system.

On Intel x86 series CPU computers. This system is composed of thousands of programmers around the world.

Designed and implemented. The purpose is to establish a world free from the copyright control of any commercialized software.

It is a Unix-compatible product. The emergence of Linux started with a name named Linus Torvalds

He was a student at the University of Helsinki, Finland. His purpose is to design

Replace Minix (an operating system written by a computer professor named Andrew Tannebaum

Operating System, which can be used by individuals with 386, 486, or Pentium Processors

Computer, and has all the functions of the Unix operating system, so began the design of the Linux prototype.

Linux is famous for its efficiency and flexibility. It can implement all Unix features on PC computers,

Multi-task and multi-user capabilities. Linux is obtained free of charge under the GNU Public License.

POSIX-compliant operating systems. Linux operating system software package not only includes complete Linux operations

It also includes text editors, advanced language compilers, and other application software. It also includes

The X-Windows Graphical User Interface of multiple Window managers, just like Windows NT, allows

You can operate the system using Windows, icons, and menus.
What is the difference between Linux and other operating systems:
Linux can coexist with other operating systems such as MS-DOS, OS/2, and Windows on the same machine. It

They are all operating systems and have some commonalities, but each has its own characteristics and differences.
Currently, the operating systems running on PCs mainly include Microsoft's MS-DOS, Windows, and Windows

NT, ibm OS/2, etc. Early PC users generally use MS-DOS because of this operating system on the machine

Hardware configuration requirements are not high. With the rapid development of computer hardware technology, the price of hardware equipment is increasing.

The lower the hardware configuration, the easier it is to improve the computer hardware configuration.

Windows, Windows NT, and other operating systems with graphical interfaces. Linux is a new concern

Operating System, which is gradually accepted by PC users. Therefore, for Linux and other operating systems

What is the difference? The following two aspects are discussed.
First, let's take a look at the differences between Linux and MS-DOS. Run Linux and MS-DOS on the same system

It is very common that MS-DOS does not fully implement the functions of x86 processor, and

Linux runs completely in the processor protection mode and develops all the features of the processor. Linux can

Directly access all available memory in the computer and provide a complete Unix interface. While MS-DOS only supports

Unix interfaces.
In terms of cost of use, Linux and MS-DOS are two completely different entities. And other commercial operating systems

MS-DOS is cheaper, and has a large share in PC users, any other PC

Machine operating systems are difficult to reach the popularity of MS-DOS, because the cost of other operating systems for the majority

PC users are not a small burden. Linux is free. You can

... The remaining full text>

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.