.\" Reboot/halt and Linux information extracted from Rick Faith's original .\" sync(8) manpage, dating back to the Linux 0.99 days. The Linux-specific .\" information is attributed to Linus Torvalds .\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu) .\" May be distributed under the GNU General Public License .\" .\" Japanese Version Copyright (c) 2000 Yuichi SATO .\" all rights reserved. .\" Translated Tue Jun 13 14:04:28 JST 2000 .\" by by Yuichi SATO .\" .\"WORD: synchronize 同期 .\"WORD: superblock スーパーブロック .\"WORD: halt 停止 .\"WORD: processer プロセッサー .\" .TH SYNC 8 1998-11-01 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O sync \- synchronize data on disk with memory sync \- ディスク上のデータをメモリと同期させる .\"O .SH SYNOPSIS .SH 書式 .B "sync [\-\-help] [\-\-version]" .\"O .SH DESCRIPTION .SH 説明 .\"O .B sync .\"O writes any data buffered in memory out to disk. .\"O This can include (but is not limited to) modified superblocks, .\"O modified inodes, and delayed reads and writes. .\"O This must be implemented by the kernel; .\"O The .\"O .B sync .\"O program does nothing but exercise the .\"O .BR sync (2) .\"O system call. .B sync はメモリにバッファされたすべてのデータをディスクに書き込む。 これには、変更されたスーパーブロック・変更された inode・ 遅延した読み書きが含まれる (他にもあるかもしれない)。 これはカーネルに実装されているべきである。 なぜなら .B sync プログラムは .BR sync (2) システムコールを行使するだけだからである。 .PP .\"O The kernel keeps data in memory to avoid doing (relatively slow) disk .\"O reads and writes. .\"O This improves performance, but if the computer .\"O crashes, data may be lost or the filesystem corrupted as a result. .\"O .B sync .\"O ensures that everything in memory is written to disk. カーネルは (比較的遅い) ディスクの読み書きを避けるため、 データをメモリに保持する。 これにより性能は向上するが、コンピュータがクラッシュした場合、 結果としてデータが損失したりファイルシステムが壊れたりするかもしれない。 .B sync はメモリにある内容すべてがディスクに書き込まれることを保証する。 .PP .\"O .B sync .\"O should be called before the processor is halted in an unusual manner .\"O (e.g., before causing a kernel panic when debugging new kernel code). .\"O In general, the processor should be halted using the .\"O .BR shutdown (8) .\"O or .\"O .BR reboot (8) .\"O or .\"O .BR halt (8) .\"O commands, which will attempt to put the system in a quiescent state .\"O before calling .\"O .BR sync (2). .\"O (Various implementations of these commands exist; consult your .\"O documentation; on some systems one should not call .\"O .BR reboot (8) .\"O and .\"O .BR halt (8) .\"O directly.) (新しいカーネルコードをデバックしていてカーネルパニックを引き起こす前などの) 通常と異なる方法でプロセッサーを停止させる前には、 .B sync を呼び出すべきである。 一般的には .BR sync (2) を呼び出す前に、 システムを静止状態にさせる .BR shutdown (8), .BR reboot (8), .BR halt (8) といったコマンドを使ってプロセッサーを停止させるべきである。 (これらのコマンドにはいろいろな実装があるので、 ドキュメントを当ること。 .BR reboot (8), .BR halt (8) を直接呼び出すべきではないシステムもある。) .\"O .SH "OPTIONS" .SH オプション .TP .B "\-\-help" .\"O Print a usage message on standard output and exit successfully. 標準出力に使用方法のメッセージを出力して正常終了する。 .TP .B "\-\-version" .\"O Print version information on standard output, then exit successfully. 標準出力にバージョン情報を出力して正常終了する。 .TP .B "\-\-" .\"O Terminate option list. オプションリストを終了する。 .\"O .SH ENVIRONMENT .SH 環境変数 .\"O The variables \fBLANG\fP, \fBLC_ALL\fP, \fBLC_CTYPE\fP, .\"O and \fBLC_MESSAGES\fP have the usual meaning. 変数 \fBLANG\fP, \fBLC_ALL\fP, \fBLC_CTYPE\fP, \fBLC_MESSAGES\fP は通常の意味を持つ。 .\"O .SH "CONFORMING TO" .SH 準拠 POSIX.2. .\"O .SH NOTES .SH 注意 .\"O On Linux, .\"O .B sync .\"O is only guaranteed to schedule the dirty blocks for writing; it can .\"O actually take a short time before all the blocks are finally written. .\"O The .\"O .BR reboot (8) .\"O and .\"O .BR halt (8) .\"O commands take this into account by sleeping for a few seconds after .\"O calling .\"O .BR sync (2). Linux では、 .B sync は (まだ書き込まれていない) ダーティなブロックの書き込みを スケジューリングすることのみを保証する。 つまり、すべてのブロックの書き込みが終るまでに、実際には少し時間がかかる。 .BR reboot (8), .BR halt (8) コマンドは .BR sync (2) を呼んだ後に数秒間スリープすることで、これを考慮に入れている。 .PP .\"O This page describes .\"O .B sync .\"O as found in the file\%utils-4.0 package; .\"O other versions may differ slightly. このページでは file\%utils-4.0 パッケージでの .B sync コマンドについて説明しているので、 その他のバージョンでは少し違いがあるかもしれない。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR sync (2), .BR halt (8), .BR reboot (8), .BR update (8)