Add to Favorites | Chinese
Hot Concern
Related Articles
Column list
In UNIX system by by accident the refreshment of cutout file is politic
From;    Author:Stand originally
Differ with DOS/Windows, after UNIX is deleted restore very hard, by UNIX unique construction of system decides this. DOS/Windows of UNIX catalog unlike in that way, although be deleted later still store complete name, length, only then bunch date (the number of the first disk piece that has namely) etc important information; is contrary, its information relies on the data structure of node of a kind of I that be called to describe entirely, and I node is in after be being deleted accordingly namely by clear sky, accordingly, the content that wants to restore to be deleted directly is impossible almost, must monarch additionally path. Article couple is real, discuss a few kinds of specific implementation that resume strategy and its key move.
   One, UNIX construction of system
We know, UNIX regards his as in order to coil systematic memory format, and different UNIX system, roll the format is discrepant, even even if the different version that same UNIX* makes a system, its system may not is identical, for example: Edition of SCO UNIX 4.1 with 5 edition construction of system has apparent difference, but as long as it is UNIX system, the basic structure that its coil is consistent. The analysis is as follows:
No matter be what UNIX system, without giving thought to what version, its coil to include to bring at least guide block, super piece, a few parts such as division of I node watch, data. Besides, different UNIX version still may have different difference. For example: Index piece mixes the bitmap of SCO UNIX system the logic of bitmap piece AIX coils the watch. The refreshment that the characteristic of these systems does not affect outcome is politic, do not make here discuss, introduce standard UNIX to coil only structure.
1. Leave guide block
Be located in roll most the first initial area, the guiding that this 512 byte are a system code, place of the system that it is a root is peculiar, this 512 byte are other system empty.
2. Super piece
Be located in a system the 2nd area, after follow closely leaves guide block, use at describing the structure of this system. Wait like size of I node length, system, its structure is deposited at / in Usr/include/sys/filsys.h, its structure is as follows:
Struct Filsys
The data that disk of Ushort S_isize; /* indexes node area place takes up piece several */
The data of whole system of Daddr_t S_fsize; /* piece several */
Short S_nfree; /* is in leisure piece entry watch what register currently is disengaged an amount */
Daddr_t S_free[NICFREE]; /* is disengaged a registration form */
Leisure of Short S_ninode; /* indexes node counts */
Registration form of disengaged node of Ino_t S_inode[NICINOD]; /* */
Char S_flock; /* adds a lock to indicate a */
上一页12 下一页
About us | Legal Notices | Sitemap | Links | Partner