Zhejiang University of Technology, Simple Unix File System
3 |-----------------------------------------------------------
4 |实现功能
5 |01.Exit system....................................(exit)
6 |02.Show help information..........................(help)
7 |03.Show current directory..........................(pwd)
8 |04.File list of current directory...................(ls)
9 |05.Enter the specified directory..........(cd + dirname)
10 |06.Return last directory.........................(cd ..)
11 |07.Create a new directory..............(mkdir + dirname)
12 |08.Delete the directory................(rmdir + dirname)
13 |09.Create a new file....................(create + fname)
14 |10.Open a file............................(open + fname)
15 |11.Read the file...................................(cat)
16 |12.Write the file.....................(write + contents)
17 |13.Copy a file..............................(cp + fname)
18 |14.Delete a file............................(rm + fname)
19 |15.System information view........................(info)
20 |16.Close the current user.......................(logout)
21 |17.Change the current user...............(su + username)
22 |18.Change the mode of a file.............(chmod + fname)
23 |19.Change the user of a file.............(chown + fname)
24 |20.Change the group of a file............(chgrp + fname)
25 |21.Rename a file............................(mv + fname)
26 |22.link.....................................(ln + fname)
27 |23.Change password..............................(passwd)
28 |24.User Management Menu..........................(Muser)
29 |注:该代码中cat指令与write指令与要求中有所不同,需要先对文件执行open指令后才可以读写。
30 |空闲盘块分配采用成组链接,空闲inode节点采用位示图法。
31 | --------------------------------------------------------------------------------