JPH05342075A - File managing system - Google Patents

File managing system

Info

Publication number
JPH05342075A
JPH05342075A JP4145739A JP14573992A JPH05342075A JP H05342075 A JPH05342075 A JP H05342075A JP 4145739 A JP4145739 A JP 4145739A JP 14573992 A JP14573992 A JP 14573992A JP H05342075 A JPH05342075 A JP H05342075A
Authority
JP
Japan
Prior art keywords
file
directory
directory file
link
files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4145739A
Other languages
Japanese (ja)
Inventor
Yoshinori Mogi
義則 茂木
Michimasa Aramaki
道昌 荒▲巻▼
Takeshi Ichimatsu
健 一松
Fujiki Fujii
藤樹 藤居
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP4145739A priority Critical patent/JPH05342075A/en
Publication of JPH05342075A publication Critical patent/JPH05342075A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To enable link processing between directory files and to easily grasp entire file structure by storing the retrieval information of the dummy directory file in the real directory file. CONSTITUTION:When preparing the dummy directory file (ID) of [/usr1/sum] with [/usr3/jun] as the real directory file (RD,) and (i) node having the same substance information as the RD of a link source is applied to the ID of a link destination. Further, the (i) node number and file name of the ID are added to the master directory file [usr1] of the ID of the link destination. Thus, link processing is enabled between the directory files. On the other hand, the (i) node number of the ID at the link destination and the (i) node number of the master directory file are added to an ID list. Therefore, the existence of the ID can be recognized from the file or directory file managed by the RD.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、ファイル管理システ
ムに関するものであり、特に、そのディレクトリファイ
ル間のリンク処理に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file management system, and more particularly to a link process between directory files.

【0002】[0002]

【従来の技術】一般的にUNIX等のファイル管理シス
テムにおいては、複数のファイルを階層構造で管理す
る。図6に、UNIX(商標)(4.3BSD版)のフ
ァイル管理システムを示す。物理ディスク51は、パーテ
ィションと呼ばれる複数の論理的な区分に分割されてい
る。この例ではパーティション51a,51b,51c,51dに分割
されている。なお、一のパーティションが一のファイル
システムを構成する。
2. Description of the Related Art Generally, in a file management system such as UNIX, a plurality of files are managed in a hierarchical structure. FIG. 6 shows a file management system of UNIX (trademark) (4.3 BSD version). The physical disk 51 is divided into a plurality of logical partitions called partitions. In this example, it is divided into partitions 51a, 51b, 51c, 51d. It should be noted that one partition constitutes one file system.

【0003】各パーティションは、複数のシリンダグル
ープに分割されており、そのうちの一のシリンダグルー
プ55は、スーパーブロック57、シリンダグループブロッ
ク59、iノードリスト61およびデータブロック63から構
成されている。他のシリンダグループも同様である。
Each partition is divided into a plurality of cylinder groups, and one of the cylinder groups 55 is composed of a super block 57, a cylinder group block 59, an inode list 61 and a data block 63. The same applies to other cylinder groups.

【0004】スーパーブロック57には、当該ファイルシ
ステムの大きさ等、そのファイルシステムを管理するた
めに必要な情報が格納されている。なお、スーパーブロ
ックは、ファイルシステムごとに1つ設ければよいので
あるが、信頼性を高めるため、各シリンダーグループブ
ロックに同じ情報が記憶されている。シリンダーグルー
プブロック59には、シリンダグループ内の有効ブロック
のビットマップ情報や統計情報が格納されている。
The super block 57 stores information necessary for managing the file system, such as the size of the file system. One super block may be provided for each file system, but the same information is stored in each cylinder group block in order to improve reliability. The cylinder group block 59 stores bitmap information and statistical information of valid blocks in the cylinder group.

【0005】iノードリスト61には、iノードの配列が
格納されており、ここに格納されているiノードの数の
分だけのファイルを、そのシリンダーグループブロック
に作成することができる。各iノードには、ファイルの
種類(通常ファイルかディレクトリファイルか等)、そ
のファイルの大きさ、およびデータブロックへのアドレ
ス情報等の各ファイルの属性が格納されている。図7
に、iノードリスト61に格納されているiノードの一例
を示す。同図Aにおいて、ファイルの種類は[D]であ
るので、ディレクトリファイルであることがわかる。ま
た同図Bにおいて、ファイルの種類は[−]であるの
で、通常ファイルであることがわかる。なお、ファイル
の実体を管理している領域およびファイルの大きさ等か
ら、そのファイルの実体を知ることができる。
The inode list 61 stores an array of inodes, and as many files as the number of inodes stored therein can be created in the cylinder group block. Each i-node stores the attributes of each file such as the file type (normal file or directory file), the size of the file, and address information to the data block. Figure 7
An example of the inode stored in the inode list 61 is shown in FIG. In FIG. A, since the file type is [D], it can be seen that it is a directory file. Further, in FIG. 9B, since the file type is [-], it can be seen that it is a normal file. The substance of the file can be known from the area managing the substance of the file and the size of the file.

【0006】図6に戻って、データブロック63には、通
常ファイルおよびディレクトリファイルの実体が格納さ
れている。通常ファイルの実体には、図8に示すように
当該ファイルの実際のデータが格納されている。
Returning to FIG. 6, the data block 63 stores the substance of normal files and directory files. The actual data of the file is stored in the substance of the normal file as shown in FIG.

【0007】ディレクトリファイルの実体の一例を図9
A,図9C,図9Eに示す。ディレクトリファイルの実
体部分には、当該ディレクトリファイルのiノード番
号、当該ディレクトリファイルの親ディレクトリファイ
ルのiノード番号、および当該ディレクトリファイルが
管理しているファイルのiノード番号およびファイル名
が格納されている。なお、ここでいうファイルには、デ
ィレクトリファイルも含む。
An example of the substance of the directory file is shown in FIG.
A, FIG. 9C, and FIG. 9E are shown. The substantial part of the directory file stores the inode number of the directory file, the inode number of the parent directory file of the directory file, and the inode number and file name of the file managed by the directory file. .. The files mentioned here include directory files.

【0008】例えば、図9Aは、ルートディレクトリを
示す。同図においてファイル名[・]に対応するiノー
ド番号が、そのディレクトリファイルのiノード番号で
ある。すなわちルートディレクトリのiノード番号は2
である。その下欄のファイル名[・・]に対応するiノ
ード番号は、ルートディレクトリの親ディレクトリファ
イルのiノード番号である。ルートディレクトリには、
親ディレクトリファイルが存在しないため、親ディレク
トリファイルとして同じiノード番号2が与えられてい
る。その下欄には、ルートディレクトリが管理している
ファイルが格納されており、ファイル[usr1]のiノー
ド番号は3、ファイル[usr2]のiノード番号は4、フ
ァイル[usr3]のiノード番号は5、ファイル[usr4]
のiノード番号は6であることがわかる。
For example, FIG. 9A shows a root directory. In the figure, the inode number corresponding to the file name [.] Is the inode number of the directory file. That is, the inode number of the root directory is 2
Is. The inode number corresponding to the file name [...] In the column below is the inode number of the parent directory file of the root directory. In the root directory,
Since the parent directory file does not exist, the same inode number 2 is given as the parent directory file. The files under the root directory are stored in the lower column. The file [usr1] has an inode number of 3, the file [usr2] has an inode number of 4, and the file [usr3] has an inode number. Is 5, file [usr4]
It can be seen that the inode number of is 6.

【0009】つぎに、図11に示すようなツリー構造の
ファイルシステムにおいて、ファイル[/usr3/jun/car.
c]にアクセスする手順について説明する。ルートディ
レクトリの実体は、すでに説明したように、図9Aに示
すような構造をしており、ファイル[/usr3]のiノー
ド番号は5であるとわかる。iノード番号5のiノード
を図9Bに示す。同図において、ファイルの種類は
[D]であるので[/usr3]がディレクトリファイルで
あることがわかる。さらに、その実体を管理している領
域等を見ると、図9Cに示すようにディレクトリファイ
ル[/usr3]の実体がわかる。
Next, in the file system having a tree structure as shown in FIG. 11, the file [/ usr3 / jun / car.
The procedure for accessing [c] will be described. As described above, the substance of the root directory has the structure shown in FIG. 9A, and it can be seen that the inode number of the file [/ usr3] is 5. The inode with inode number 5 is shown in FIG. 9B. In the figure, since the file type is [D], it can be seen that [/ usr3] is a directory file. Further, looking at the area or the like that manages the entity, the entity of the directory file [/ usr3] can be seen as shown in FIG. 9C.

【0010】ディレクトリファイル[/usr3]の実体を
見ることにより、ファイル[jun]のiノード番号は7
であるとわかる。iノード番号7のiノードを図9Dに
示す。同図において、ファイルの種類は[D]であるの
で[/jun]がディレクトリファイルであることがわか
る。さらに、その実体を管理している領域等を見ると、
図9Eに示すようにディレクトリファイル[/jun]の実
体がわかる。
By looking at the substance of the directory file [/ usr3], the inode number of the file [jun] is 7
I understand. The inode with inode number 7 is shown in FIG. 9D. In the figure, since the file type is [D], it can be seen that [/ jun] is a directory file. Furthermore, if you look at the areas that manage that entity,
As shown in FIG. 9E, the substance of the directory file [/ jun] can be understood.

【0011】ディレクトリファイル[/jun]の実体を見
ることにより、ファイル[car.c]のiノード番号は1
1であるとわかる。iノード番号11のiノードを図9
Fに示す。その実体を管理している領域等を見ることに
より、ファイル[/usr3/jun/car.c]の内容がわかる。
このようにしてファイル[/usr3/jun/car.c]にアクセ
スすることができる。
By looking at the substance of the directory file [/ jun], the inode number of the file [car.c] is 1
It turns out to be 1. The inode with the inode number 11 is shown in FIG.
Shown in F. The contents of the file [/usr3/jun/car.c] can be found by looking at the area that manages the entity.
In this way, the file [/usr3/jun/car.c] can be accessed.

【0012】ところで、すでに存在する実体に対して、
別のファイル名でアクセスすることができれば、同じ内
容のファイルを複数持つ必要がなくなり、ファイルシス
テムのデータ領域を節約することができる。また、デー
タの一元化も図ることができる。たとえば、ある参照フ
ァイルを別のディレクトリファイルに移した場合、別の
ファイル名でアクセスすることができれば、いままでそ
のファイル名でその実体にアクセスしていた実行プログ
ラムを書き換える必要がない。また、他人が管理してい
るファイルを参照する際、他人が設定しているファイル
名以外で、そのファイルへアクセスするためには、目的
ファイルを、アクセスするファイル名で自己のディレク
トリファイルにコピーする必要があるが、これでは、コ
ピーする時間が無駄となるとともに、データ領域を必要
とする。
By the way, for existing entities,
If the files can be accessed with different file names, there is no need to have multiple files with the same contents, and the data area of the file system can be saved. Further, the data can be unified. For example, if a reference file is moved to another directory file and can be accessed with a different file name, there is no need to rewrite the execution program that has accessed the entity with that file name. Also, when referring to a file managed by another person, in order to access that file with a file name other than that set by another person, copy the target file to its own directory file with the file name to be accessed. Although it is necessary, this wastes the copying time and requires the data area.

【0013】そこで、リンク処理がなされる。リンク処
理には、ハードリンクとシンボリックリンクがある。ま
ずハードリンクする方法について説明する。ハードリン
クは、ファイル間のリンク処理を行なうもので、本ファ
イルシステムにおいては、つぎの[In]コマンドによ
って設定される。
Therefore, link processing is performed. Link processing includes hard links and symbolic links. First, the method of hard linking will be described. The hard link performs a link process between files and is set by the following [In] command in this file system.

【0014】 % ln /usr3/jun/car.c /usr1/tmp/a.c ・・・(1) このようなコマンドが実行されると、図10Aに示すよ
うに、ファイル[/usr3/jun/car.c]と同じiノード番
号をもつファイル[/usr1/tmp/a.c]が、ディレクトリ
ファイル[/usr1/tmp]の実体に追加される。
% Ln /usr3/jun/car.c / usr1 / tmp / ac (1) When such a command is executed, as shown in FIG. 10A, the file [/ usr3 / jun / car / The file [/ usr1 / tmp / ac] having the same inode number as that of .c] is added to the substance of the directory file [/ usr1 / tmp].

【0015】同図において、iノード番号11のファイ
ル名[a.c]が、追加されている。ここで、図9Eに示
すように、ファイル[/usr3/jun/car.c]のiノード番
号は11である。同じiノード番号をもつファイルの実
体は同じであるので、図11に示すように、ファイル
[/usr3/jun/car.c]の実体に対してファイル[/usr1/t
mp/a.c]でアクセス可能となる。なお、図8に示すファ
イル[/usr3/jun/car.c]の実体に記憶されているハー
ドリンクの数は1増えて2となる。
In the figure, the file name [ac] of the inode number 11 is added. Here, as shown in FIG. 9E, the inode number of the file [/usr3/jun/car.c] is 11. Since the files having the same inode number have the same entity, as shown in FIG. 11, the file [/usr3/jun/car.c] has a file [/ usr1 / t
mp / ac] to access. The number of hard links stored in the substance of the file [/usr3/jun/car.c] shown in FIG. 8 is increased by 1 to 2.

【0016】このように、ハードリンクをおこなうこと
により、記憶データの一元化も図ることができるととも
に、ファイルシステムのデータ領域を節約することがで
きる。
By thus performing the hard link, the stored data can be unified and the data area of the file system can be saved.

【0017】一方、ファイル間のみリンク処理可能なハ
ードリンクに対して、ディレクトリファイル間をもリン
ク処理可能なシンボリックリンクがある。シンボリック
リンクは、リンク先のディレクトリファイルのパス名
を、リンク元のディレクトリファイルに付与することに
より、ディレクトリファイル間をリンクさせる。シンボ
リックリンクは、つぎの[In -s]コマンドによって
設定される。
On the other hand, there is a symbolic link that can perform link processing between directory files as well as a hard link that can perform link processing only between files. The symbolic link links the directory files by adding the path name of the link destination directory file to the link source directory file. Symbolic links are set by the following [In-s] command.

【0018】% ln -s /usr3/jun /usr1 ・・・(2) このようなコマンドが実行されると、図10Bに示すよ
うに、シンボリックリンクの情報が記憶されたファイル
が作成される。さらに、図7Aに示すようにシンボリッ
クリンクのiノード番号がディレクトリファイル[/usr
1]のiノードに記憶される。これにより、リンク先の
ディレクトリファイルのパス名が、リンク元のディレク
トリファイルに与えられる。すなわち、図12に示すよ
うにディレクトリファイル[/usr1]にパス先であるデ
ィレクトリファイル[/usr3/jun]が与えられる。
% Ln -s / usr3 / jun / usr1 (2) When such a command is executed, as shown in FIG. 10B, a file in which the information of the symbolic link is stored is created. Further, as shown in FIG. 7A, the inode number of the symbolic link is the directory file [/ usr
1] is stored in the inode. As a result, the path name of the link destination directory file is given to the link source directory file. That is, as shown in FIG. 12, the directory file [/ usr1] is given the directory file [/ usr3 / jun] which is the path destination.

【0019】したがって、ファイル[/usr1/jun/car.
c]にアクセスした場合、ディレクトリファイル[/usr
1]には、そのような名前のファイルがなくとも、自動
的にディレクトリファイル[/usr3/jun]が検索され、
ディレクトリファイル[/usr1]にファイル[/usr1/jun
/car.c]が、存在するとして処理される。
Therefore, the file [/ usr1 / jun / car.
If you access c], the directory file [/ usr
1], the directory file [/ usr3 / jun] will be searched automatically even if there is no file with such a name.
File [/ usr1 / jun] in directory file [/ usr1]
/car.c] is processed as if it exists.

【0020】このように、シンボリックリンクはディレ
クトリファイル間で処理することができるので、当該デ
ィレクトリファイルに複数のサブディレクトリファイル
およびファイルが存在する場合は、1の処理で容易にリ
ンク処理が可能となる。
As described above, since the symbolic link can be processed between directory files, if a plurality of subdirectory files and files exist in the directory file, the link processing can be easily performed by one processing. ..

【0021】[0021]

【発明が解決しようとする課題】しかしながら、上記の
ようなファイル管理システムのリンク処理においては、
次のような問題点があった。ハードリンクは、ファイル
名を指定してリンク処理を行なうので、全体のファイル
構造を把握することはできるが、ディレクトリファイル
間でリンク処理をすることができない。
However, in the link processing of the file management system as described above,
There were the following problems. Since the hard link performs the linking process by specifying the file name, the entire file structure can be grasped, but the linking process cannot be performed between the directory files.

【0022】また、シンボリックリンクはディレクトリ
ファイル間においてリンク処理可能ではあるが、リンク
先のディレクトリファイルのパス名を付与することによ
りリンク処理を行なっているので、リンク先のディレク
トリファイルにとっては、リンク元のディレクトリファ
イルがわからない。したがって、全体のファイル構造の
把握が容易ではない。
Although the symbolic link can be linked between directory files, since the link processing is performed by adding the path name of the linked destination directory file, the linked source directory file is linked to the linked source. I don't know the directory file. Therefore, it is not easy to grasp the entire file structure.

【0023】この発明は、上記のような問題点を解決
し、ディレクトリファイル間のリンク処理可能となると
ともに、全体のファイル構造を把握が容易となるファイ
ル管理システムを提供することを目的とする。
It is an object of the present invention to solve the above problems and to provide a file management system capable of linking directory files and facilitating grasp of the entire file structure.

【0024】[0024]

【課題を解決するための手段】請求項1にかかるファイ
ル管理システムは、一または二以上の通常ファイル、当
該一または二以上の通常ファイル情報を管理する複数の
ディレクトリファイル、を備えており、ディレクトリフ
ァイル間のリンク処理が可能なファイル管理システムに
おいて、リンク元のディレクトリファイルを実ディレク
トリファイルとし、リンク先のディレクトリファイルを
虚ディレクトリファイルとするとともに、虚ディレクト
リファイルの検索情報を、実ディレクトリファイルに記
憶させること、を特徴とする。
A file management system according to claim 1 comprises one or more normal files and a plurality of directory files for managing the one or more normal file information. In a file management system that can perform link processing between files, the link source directory file is the real directory file, the link destination directory file is the imaginary directory file, and the search information of the imaginary directory file is stored in the real directory file. It is characterized by.

【0025】[0025]

【作用】請求項1にかかるファイル管理システムにおい
ては、虚ディレクトリファイルの検索情報が、実ディレ
クトリファイルに記憶されている。したがって、実ディ
レクトリファイルが管理しているファイルまたはディレ
クトリファイルから、虚ディレクトリファイルの存在を
知ることができる。
In the file management system according to the first aspect, the search information of the imaginary directory file is stored in the real directory file. Therefore, the existence of an imaginary directory file can be known from the file or directory file managed by the real directory file.

【0026】[0026]

【実施例】本発明の一実施例を図面に基づいて説明す
る。図3に示すようなツリー構造のファイルシステムに
おけるファイル管理状態を図2C,図2D,図2Eに示
す。まず、本ファイルシステムにおいて、ファイル[/u
sr3/jun/car.c]にアクセスする手順について説明す
る。ルートディレクトリの実体をみてルートディレクト
リが管理するファイル[usr3]のiノード番号を検索す
る。つぎに、その実体を見ることにより、図2Cに示す
ようにディレクトリファイル[usr3]が管理しているフ
ァイルおよびそのiノード番号がわかる。ファイル[ju
n]のiノード番号は7であるとわかり、同図Dに示す
ように、iノード番号7のiノードをみることにより、
ファイル[jun]がディレクトリファイルであること
や、アドレス情報等がわかる。
An embodiment of the present invention will be described with reference to the drawings. File management states in the tree-structured file system as shown in FIG. 3 are shown in FIGS. 2C, 2D, and 2E. First, in this file system, the file [/ u
[sr3 / jun / car.c] will be described. Looking at the substance of the root directory, the inode number of the file [usr3] managed by the root directory is searched. Next, by looking at the substance, the file managed by the directory file [usr3] and its inode number can be known as shown in FIG. 2C. File [ju
It is understood that the inode number of [n] is 7, and as shown in FIG.
You can see that the file [jun] is a directory file, address information, etc.

【0027】さらに、その実体を見ることにより、同図
Eに示すようにディレクトリファイル[jun]が管理し
ているファイルおよびそのiノード番号がわかる。ファ
イル[car.c]のiノード番号は11であるとわかり、
iノード番号11のiノードをみるとファイル[car.
c]が通常ファイルであることや、アドレス情報等がわ
かる。このようにして、ファイル[/usr3/jun/car.c]
にアクセスすることができる。
Further, by looking at the substance, the file managed by the directory file [jun] and its inode number can be known as shown in FIG. It can be seen that the inode number of the file [car.c] is 11.
Looking at the inode with inode number 11, the file [car.
c] is a normal file, and you can see address information. In this way, the file [/usr3/jun/car.c]
Can be accessed.

【0028】つぎに、図3に示すようなツリー構造のフ
ァイルシステムにおいて、[/usr3/jun]を実ディレク
トリファイルとして、[/usr1/sum]という虚ディレク
トリファイルを作成する方法を図4を参照しつつ説明す
る。このようなディレクトリファイル間のリンク処理
を、ディレクトリリンクとよぶ。ディレクトリリンク
は、本実施例ではつぎの[dirln ]コマンドによって設
定される。
Next, referring to FIG. 4, a method for creating an imaginary directory file [/ usr1 / sum] using [/ usr3 / jun] as a real directory file in the tree structure file system as shown in FIG. I will explain. Such a link process between directory files is called a directory link. The directory link is set by the following [dirln] command in this embodiment.

【0029】 % dirln /usr3/jun /usr1/sum ・・・(3) このようなコマンドが実行されると、リンク元となる実
ディレクトリファイルが存在するかどうか判定される
(図4ステップS101)。この場合、図3に示すように
ディレクトリファイル[/usr3/jun]が存在するので、
図4ステップS102に進む。なお、実ディレクトリファ
イルが存在しない場合は「実ディレクトリファイルが存
在しません」というメッセージを表示し(ステップS10
6)、終了する。
% Dirln / usr3 / jun / usr1 / sum (3) When such a command is executed, it is determined whether or not the actual directory file as the link source exists (step S101 in FIG. 4). .. In this case, since the directory file [/ usr3 / jun] exists as shown in FIG. 3,
The process proceeds to step S102 in FIG. If the real directory file does not exist, the message "No real directory file exists" is displayed (step S10).
6), end.

【0030】ステップS102では、リンク先である虚デ
ィレクトリファイルの名前と同じ名前のファイル(ディ
レクトリファイルを含む)がすでに存在するかどうか判
定される。この場合、図3に示すようにファイル[/usr
1/sum]は存在していないので、ステップS103に進
む。なお、同じ名前のファイルがすでに存在する場合は
「同じ名前のファイルがすでに存在します」というメッ
セージを表示し(ステップS106)、終了する。
In step S102, it is determined whether or not a file (including a directory file) having the same name as the name of the imaginary directory file which is the link destination already exists. In this case, the file [/ usr
1 / sum] does not exist, the process proceeds to step S103. If a file with the same name already exists, a message "a file with the same name already exists" is displayed (step S106), and the process ends.

【0031】ステップS103では、リンク先である虚デ
ィレクトリファイルがリンク元となる実ディレクトリフ
ァイルの子孫にあたるかどうか判定される。この場合、
図3に示すように、子孫関係にはないので、ステップS
104に進む。なお、子孫関係である場合は「ディレクト
リリンクすることができません」というメッセージを表
示し(ステップS106)、終了する。
In step S103, it is determined whether the imaginary directory file which is the link destination is a descendant of the real directory file which is the link source. in this case,
As shown in FIG. 3, since there is no descendant relationship, step S
Continue to 104. In the case of a descendant relationship, a message "Directory cannot be linked" is displayed (step S106), and the process ends.

【0032】このように本実施例においては、リンク先
である虚ディレクトリファイルがリンク元となる実ディ
レクトリファイルの子孫にあたる場合には、ディレクト
リリンクを禁止するようにしている。これにより、実デ
ィレクトリファイルの下にもう1度実ディレクトリファ
イルのが存在するという状態(ループ状態)の発生を防
止することができる。
As described above, in this embodiment, the directory link is prohibited when the virtual directory file which is the link destination is a descendant of the real directory file which is the link source. As a result, it is possible to prevent the occurrence of a state (loop state) in which the real directory file exists again below the real directory file.

【0033】ステップS104において、図2Bに示すよ
うに、リンク先である虚ディレクトリファイルのiノー
ドとして、リンク元となる実ディレクトリファイルと同
じ実体情報をもつiノードが新たに作成される。この場
合、ディレクトリファイル[/usr3/jun]を示すiノー
ド番号7のiノードと同じ実体情報をもつiノード番号
17のiノードが作成される。さらに、図2Aに示すよ
うに、リンク先である虚ディレクトリファイルの親ディ
レクトリファイルの実体に、iノード番号17でファイ
ル名[sum]というファイルが追加される。
In step S104, as shown in FIG. 2B, an inode having the same entity information as that of the real directory file which is the link source is newly created as the inode of the virtual directory file which is the link destination. In this case, the inode with the inode number 17 having the same substance information as the inode with the inode number 7 indicating the directory file [/ usr3 / jun] is created. Further, as shown in FIG. 2A, a file having a file name [sum] with an inode number 17 is added to the substance of the parent directory file of the imaginary directory file which is the link destination.

【0034】図4に戻って、ステップS105において、
虚ディレクトリファイルリストに、リンク先である虚デ
ィレクトリファイルのiノード番号およびその親ディレ
クトリファイルのiノード番号が追加される。この場合
は、虚ディレクトリファイルである[/usr1/sum]のi
ノード番号17および、その親ディレクトリファイルで
ある[/usr1]のiノード番号3が、虚ディレクトリフ
ァイルリスト29に追加される。
Returning to FIG. 4, in step S105,
The inode number of the imaginary directory file that is the link destination and the inode number of its parent directory file are added to the imaginary directory file list. In this case, i of the imaginary directory file [/ usr1 / sum]
The node number 17 and the i-node number 3 of its parent directory file [/ usr1] are added to the imaginary directory file list 29.

【0035】このようにして、図1に示すように[/usr
3/jun]を実ディレクトリファイルとして、[/usr1/su
m]という虚ディレクトリファイルが作成される。な
お、同様にして、一の実ディレクトリファイルを、複数
の虚ディレクトリファイルとディレクトリリンクさせる
こともできる。
Thus, as shown in FIG. 1, [/ usr
3 / jun] as a real directory file, [/ usr1 / su
An imaginary directory file called m] is created. Similarly, one real directory file can be directory-linked with a plurality of imaginary directory files.

【0036】以上説明したように、本実施例において
は、ディレクトリリンクを行なった場合、リンク先であ
る虚ディレクトリファイルに、リンク元となる実ディレ
クトリファイルと同じ実体情報をもつiノードを与えて
いる。また、リンク先である虚ディレクトリファイルの
親ディレクトリファイルの実体に、虚ディレクトリファ
イルのiノード番号およびそのファイル名を追加するよ
うにしている。これにより、ディレクトリファイル間の
リンク処理が可能となる。
As described above, in the present embodiment, when directory linking is performed, an i-node having the same substance information as that of the real directory file of the link source is given to the virtual directory file of the link destination. .. Further, the inode number of the imaginary directory file and its file name are added to the substance of the parent directory file of the imaginary directory file that is the link destination. This enables link processing between directory files.

【0037】また、虚ディレクトリファイルリスト29
に、リンク先である虚ディレクトリファイルのiノード
番号および、その親ディレクトリファイルのiノード番
号を追加するようにしている。したがって、実ディレク
トリファイルが管理しているファイルまたはディレクト
リファイルから、虚ディレクトリファイルの存在を知る
ことができる。
Also, the virtual directory file list 29
In addition, the i-node number of the imaginary directory file that is the link destination and the i-node number of the parent directory file are added. Therefore, the existence of an imaginary directory file can be known from the file or directory file managed by the real directory file.

【0038】つぎに、図1、図5を参照しつつ、ディレ
クトリリンクさせた実ディレクトリファイルまたは虚デ
ィレクトリファイルを削除する方法を説明する。まず、
虚ディレクトリファイル[/usr1/sum]を削除する場合
について説明する。虚ディレクトリファイル削除は、つ
ぎの[rmdir]コマンドによって設定される。
Next, a method for deleting a directory-linked real directory file or imaginary directory file will be described with reference to FIGS. First,
A case of deleting the imaginary directory file [/ usr1 / sum] will be described. Virtual directory file deletion is set by the following [rmdir] command.

【0039】% rmdir /usr1/sum ・・・(4) このようなコマンドが実行されると、削除対象であるデ
ィレクトリファイルが存在するかどうか判定される(ス
テップS201)。この場合、図1に示すように、ディレ
クトリファイル[/usr1/sum]が存在するので、ステッ
プS202に進む。なお、削除対象であるディレクトリフ
ァイルが存在しない場合は「ディレクトリファイルが存
在しません」というメッセージを表示し(ステップS20
9)、終了する。
% Rmdir / usr1 / sum (4) When such a command is executed, it is determined whether or not the directory file to be deleted exists (step S201). In this case, as shown in FIG. 1, since the directory file [/ usr1 / sum] exists, the process proceeds to step S202. If the directory file to be deleted does not exist, the message "Directory file does not exist" is displayed (step S20).
9), end.

【0040】ステップS202では、削除対象のディレク
トリファイルが虚ディレクトリファイルか否かが判定さ
れる。この場合、ディレクトリファイル[/usr1/sum]
をルートディレクトリからたどっていき、その実体を参
照することにより、ディレクトリファイル[/usr1/su
m]は図2Eに示すように、虚ディレクトリファイルで
あることが判明するので、図5ステップS207に進む。
In step S202, it is determined whether the directory file to be deleted is an imaginary directory file. In this case, the directory file [/ usr1 / sum]
Directory from the root directory and referencing its entity, the directory file [/ usr1 / su
[m] is found to be an imaginary directory file, as shown in FIG. 2E, and the process proceeds to step S207 in FIG.

【0041】ステップS207においては、虚ディレクト
リファイルリストから、虚ディレクトリファイルのiノ
ード番号およびその親ディレクトリファイルのiノード
番号が削除される。この場合は、[/usr1/sum]のiノ
ード番号17および[/usr1]のiノード番号3が虚デ
ィレクトリファイルリスト29から削除される。
In step S207, the inode number of the imaginary directory file and the inode number of its parent directory file are deleted from the imaginary directory file list. In this case, the inode number 17 of [/ usr1 / sum] and the inode number 3 of [/ usr1] are deleted from the imaginary directory file list 29.

【0042】つぎに、この削除ディレクトリの使用して
いるiノードテーブルを解放し(ステップS206)、終
了する。この場合、ディレクトリファイル[/usr1/su
m]を示すiノード番号17のiノードが使用していた
領域が解放され、終了する。このように、虚ディレクト
リファイルを削除する場合には、なんら特殊な処理をす
ることなく削除すればよい。
Next, the i-node table used by this deletion directory is released (step S206), and the process ends. In this case, the directory file [/ usr1 / su
The area used by the inode with the inode number 17 indicating [m] is released, and the process ends. In this way, when deleting an imaginary directory file, it may be deleted without any special processing.

【0043】つぎに、実ディレクトリファイル[/usr3/
jun]を削除する場合について説明する。この場合も、
上述したよう[rmdir]コマンドによって設定される。
Next, the actual directory file [/ usr3 /
[jun] will be described. Again,
It is set by the [rmdir] command as described above.

【0044】% rmdir /usr3/jun ・・・(5) このようなコマンドが実行されると、削除対象であるデ
ィレクトリファイルが存在するかどうか判定される(ス
テップS201)。この場合、図1に示すように、ディレ
クトリファイル[/usr3/jun]が存在するので、ステッ
プS202に進む。なお、削除対象であるディレクトリフ
ァイルが存在しない場合は、上述したように「ディレク
トリファイルが存在しません」というメッセージを表示
し(ステップS209)、終了する。
% Rmdir / usr3 / jun (5) When such a command is executed, it is determined whether or not the directory file to be deleted exists (step S201). In this case, since the directory file [/ usr3 / jun] exists as shown in FIG. 1, the process proceeds to step S202. If the directory file to be deleted does not exist, the message "Directory file does not exist" is displayed as described above (step S209), and the process ends.

【0045】ステップS202で、削除対象のディレクト
リファイルが虚ディレクトリファイルか否かが判定され
る。この場合、ディレクトリファイル[/usr3/jun]を
ルートディレクトリからたどっていき、その実体を参照
することにより、ディレクトリファイル[/usr3/jun]
は、図2Eに示すように、実ディレクトリファイルであ
ることが判明するので、ステップS203に進む。
In step S202, it is determined whether or not the directory file to be deleted is an imaginary directory file. In this case, the directory file [/ usr3 / jun] is traced from the root directory, and the directory file [/ usr3 / jun] is referenced by referring to the entity.
Is found to be a real directory file, as shown in FIG. 2E, the process proceeds to step S203.

【0046】ステップS203では、削除対象のディレク
トリファイルに虚ディレクトリファイルが存在するかが
判定される。この場合は、虚ディレクトリファイル[/u
sr1/sum]が存在するのでステップS208に進む。
In step S203, it is determined whether or not an imaginary directory file exists in the directory file to be deleted. In this case, the imaginary directory file [/ u
[sr1 / sum] exists, the process proceeds to step S208.

【0047】ステップS208においては、虚ディレクト
リファイルが存在する場合、実ディレクトリファイルの
iノード番号およびその親ディレクトリファイルのiノ
ード番号が削除される。さらに、虚ディレクトリファイ
ルリストに記憶されている先頭のディレクトリファイル
のiノード番号およびその親ディレクトリファイルのi
ノード番号を、実ディレクトリファイルのiノード番号
およびその親ディレクトリファイルのiノード番号とす
る。すなわち、この場合、実ディレクトリファイルのi
ノード番号は17、その親ディレクトリファイルのiノ
ード番号は3となり、虚ディレクトリファイルは無しと
いうことになる。
In step S208, if an imaginary directory file exists, the inode number of the real directory file and the inode number of its parent directory file are deleted. Further, the i-node number of the first directory file stored in the imaginary directory file list and the i-node number of its parent directory file are stored.
Let the node number be the inode number of the real directory file and the inode number of its parent directory file. That is, in this case, i of the real directory file
The node number is 17, the inode number of its parent directory file is 3, and there is no imaginary directory file.

【0048】つぎに、この削除ディレクトリファイルの
使用していたiノードテーブルを解放し(ステップS20
6)、終了する。この場合、ディレクトリファイル[/us
r3/jun]を示すiノード番号7のiノードが使用してい
た領域が解放され、終了する。
Then, the inode table used by this deleted directory file is released (step S20).
6), end. In this case, the directory file [/ us
The area used by the inode with the inode number 7 indicating [r3 / jun] is released and the process ends.

【0049】このように、虚ディレクトリファイルを有
する実ディレクトリファイルを削除する場合は、虚ディ
レクトリファイルリスト29から先頭の虚ディレクトリフ
ァイル([/usr1/sum])を、実ディレクトリファイル
に変更することにより、削除対象の実ディレクトリファ
イル([/usr3/jun])で管理していたファイルおよび
ディレクトリファイルを、新たに実ディレクトリファイ
ルとなったディレクトリファイル([/usr1/sum])で
管理することができる。
In this way, when deleting a real directory file having an imaginary directory file, the first imaginary directory file ([/ usr1 / sum]) from the imaginary directory file list 29 is changed to the real directory file. , Files and directory files managed by the real directory file ([/ usr3 / jun]) to be deleted can be managed by the directory file ([/ usr1 / sum]) that has become a new real directory file. ..

【0050】ステップS203で、削除ディレクトリファ
イルに虚ディレクトリファイルが存在しないと判定され
た場合は、ステップS204に進む。ステップS204におい
て、削除対象であるディレクトリファイルが管理してい
るファイルまたはディレクトリファイルが存在するか
(削除対象であるディレクトリファイルが空か否か)が
判定される。
If it is determined in step S203 that there is no imaginary directory file in the deleted directory file, the process proceeds to step S204. In step S204, it is determined whether a file or directory file managed by the directory file to be deleted exists (whether or not the directory file to be deleted is empty).

【0051】削除対象であるディレクトリファイルが空
である場合は、削除対象であるディレクトリファイルの
実体が使用している領域を解放する。さらに、この削除
ディレクトリの使用していたiノードテーブルを解放し
(ステップS206)、終了する。
When the directory file to be deleted is empty, the area used by the substance of the directory file to be deleted is released. Further, the i-node table used in this deleted directory is released (step S206), and the process ends.

【0052】削除対象であるディレクトリファイルが空
でない場合は、「このディレクトリファイルは削除でき
ません」というメッセージを表示し(ステップS21
0)、終了する。このように、実ディレクトリファイル
を削除する場合に、虚ディレクトリファイルが存在せず
かつ削除対象であるディレクトリファイルが空でない場
合は、当該ディレクトリファイルを削除できないように
することにより、削除対象のディレクトリファイルが管
理しているファイルまたはディレクトリファイルを誤っ
て、削除するおそれがない。
If the directory file to be deleted is not empty, a message "This directory file cannot be deleted" is displayed (step S21).
0), end. In this way, when deleting a real directory file, if the imaginary directory file does not exist and the directory file to be deleted is not empty, the directory file to be deleted cannot be deleted. There is no risk of accidentally deleting files or directory files managed by.

【0053】[0053]

【発明の効果】請求項1にかかるファイル管理システム
においては、リンク元のディレクトリファイルを実ディ
レクトリファイルとし、リンク先のディレクトリファイ
ルを虚ディレクトリファイルとするとともに、虚ディレ
クトリファイルの検索情報を、実ディレクトリファイル
に記憶させている。したがって、実ディレクトリファイ
ルが管理しているファイルまたはディレクトリファイル
から、虚ディレクトリファイルの存在を知ることができ
る。これにより、ディレクトリファイル間のリンク処理
可能となるとともに、全体のファイル構造を把握が容易
となるファイル管理システムを提供することができる。
According to the file management system of the first aspect, the directory file of the link source is the real directory file, the directory file of the link destination is the imaginary directory file, and the search information of the imaginary directory file is the real directory file. It is stored in a file. Therefore, the existence of an imaginary directory file can be known from the file or directory file managed by the real directory file. This makes it possible to provide a file management system that enables link processing between directory files and facilitates grasping the entire file structure.

【図面の簡単な説明】[Brief description of drawings]

【図1】ディレクトリファイルをリンクさせた場合のツ
リー構造を示す図である。
FIG. 1 is a diagram showing a tree structure when directory files are linked.

【図2】ファイル管理システムの構造を示す図である。FIG. 2 is a diagram showing a structure of a file management system.

【図3】ディレクトリファイルをリンクさせる前のツリ
ー構造を示す図である。
FIG. 3 is a diagram showing a tree structure before linking directory files.

【図4】ディレクトリリンクさせるフローチャートであ
る。
FIG. 4 is a flowchart of directory linking.

【図5】ディレクトリファイルのリンクを解除させる場
合のフローチャートである。
FIG. 5 is a flowchart for canceling a link of a directory file.

【図6】従来のファイル管理システムにおけるファイル
システムを示す図である。
FIG. 6 is a diagram showing a file system in a conventional file management system.

【図7】iノードの一例を示す図である。FIG. 7 is a diagram showing an example of an inode.

【図8】通常ファイルの内容を示す図である。FIG. 8 is a diagram showing the contents of a normal file.

【図9】ディレクトリファイルの実体とiノードを示す
図である。
FIG. 9 is a diagram showing an entity of a directory file and an inode.

【図10】ディレクトリファイルの実体を示す図であ
る。
FIG. 10 is a diagram showing an entity of a directory file.

【図11】通常ファイルをハードリンクさせた場合のツ
リー構造を示す図である。
FIG. 11 is a diagram showing a tree structure when a normal file is hard-linked.

【図12】ディレクトリファイルをシンボリックリンク
させた場合のツリー構造を示す図である。
FIG. 12 is a diagram showing a tree structure when a directory file is symbolically linked.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤居 藤樹 京都府京都市右京区花園土堂町10番地 オ ムロン株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Fujiki Fujii 10 Ouron Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】一または二以上の通常ファイル、 当該一または二以上の通常ファイル情報を管理する複数
のディレクトリファイル、を備えており、 ディレクトリファイル間のリンク処理が可能なファイル
管理システムにおいて、 リンク元のディレクトリファイルを実ディレクトリファ
イルとし、リンク先のディレクトリファイルを虚ディレ
クトリファイルとするとともに、 虚ディレクトリファイルの検索情報を、実ディレクトリ
ファイルに記憶させること、を特徴とするファイル管理
システム。
1. A file management system comprising one or more normal files and a plurality of directory files for managing the information of one or more normal files, wherein the file management system is capable of linking directory files. A file management system characterized in that the original directory file is a real directory file, the linked directory file is an imaginary directory file, and the search information of the imaginary directory file is stored in the real directory file.
JP4145739A 1992-06-05 1992-06-05 File managing system Pending JPH05342075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4145739A JPH05342075A (en) 1992-06-05 1992-06-05 File managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4145739A JPH05342075A (en) 1992-06-05 1992-06-05 File managing system

Publications (1)

Publication Number Publication Date
JPH05342075A true JPH05342075A (en) 1993-12-24

Family

ID=15392030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4145739A Pending JPH05342075A (en) 1992-06-05 1992-06-05 File managing system

Country Status (1)

Country Link
JP (1) JPH05342075A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271813A (en) * 1994-03-31 1995-10-20 Toshiba Corp Information pigeonholing system
JP2001243255A (en) * 2000-03-02 2001-09-07 Ntt Comware Corp Information management system, information managing method and recording medium storing information management program
JP2008158993A (en) * 2006-12-26 2008-07-10 Hitachi Ltd Storage system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271813A (en) * 1994-03-31 1995-10-20 Toshiba Corp Information pigeonholing system
JP2001243255A (en) * 2000-03-02 2001-09-07 Ntt Comware Corp Information management system, information managing method and recording medium storing information management program
JP2008158993A (en) * 2006-12-26 2008-07-10 Hitachi Ltd Storage system

Similar Documents

Publication Publication Date Title
US5218696A (en) Method for dynamically expanding and rapidly accessing file directories
US7849112B2 (en) Using a file handle for associating the file with a tree quota in a file server
US5261088A (en) Managing locality in space reuse in a shadow written B-tree via interior node free space list
CA2139693C (en) Summary catalogs
JP2708331B2 (en) File device and data file access method
US8352518B2 (en) Mechanism for handling file level and block level remote file accesses using the same server
US6643654B1 (en) System and method for representing named data streams within an on-disk structure of a file system
Kleiman Vnodes: An Architecture for Multiple File System Types in Sun UNIX.
US5991753A (en) Method and system for computer file management, including file migration, special handling, and associating extended attributes with files
EP0451384B1 (en) Hypertext data processing system and method
US7769719B2 (en) File system dump/restore by node numbering
EP1325409B1 (en) A shared file system having a token-ring style protocol for managing meta-data
US7720869B2 (en) Hierarchical structured abstract file system
WO1996041283A9 (en) System and method for superimposing attributes on hierarchically organized file systems
JP2002525755A (en) Method and apparatus for reorganizing an active DBMS table
CA2143288A1 (en) Data storage system with set lists which contain elements associated with parents for defining a logical hierarchy and general record pointers identifying specific data sets
EP0410210A2 (en) Method for dynamically expanding and rapidly accessing file directories
JPH05342075A (en) File managing system
US8452823B2 (en) Method for coordinating relationships between multiple physical entities
Kumar et al. An integrated data structure with multiple access paths for database and its performance
JPH01273148A (en) File managing system
JP2643850B2 (en) File processing device
Koymen KSAM: A B+-tree-based keyed sequential-access method
Kumar et al. An integrated data structure with multiple access paths for database systems and its performance
Sechrest et al. The Hyperfile Model and a Hyperfile Service