I need to apply some commands on a given source code on which you could help me?
Here are the commands:
In your testscript, demonstrate each new command and that the old commands work with links and medium files. Note that the addition of medium files does not bring in any "new" commands.
fs33% mkfs disknm
creates an initially empty file volume, as before, on the simulated disk named disknm.dsk. Note that the i-node height now includes not only the fileSize field, but also the link count.
fs33% ln opnm npnm
creates npnm as a new hard link to opnm, and prints its i-node number. It creates nothing new and returns 0 in the following "abnormal" cases: a) opnm is a directory; b) no ordinary file with opnm as its path name exists; c) npnm already exists; d) npnm is an invalid pathname.
fs33% ln opnm .
creates a hard link named the same as the leaf name of opnm in the current directory and prints its i-node number. Abnormal cases similar to the above apply. For bonus points, add the flexibility that this command may omit the dot.
fs33% ln -s opnm npnm
creates npnm as a soft link to opnm, and prints its i-node number. It creates nothing new and returns 0 in the following "abnormal" cases: a) opnm does not exist; b) npnm already exists; c) npnm is an invalid pathname.
fs33% rm pnm
removes the pathname pnm, which may or may be a link, and prints the resulting link count.