Variable symbolic links for a file in UNIX operating system

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000

Reexamination Certificate

active

06327703

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention is generally directed to programming in a UNIX operating system and, more particularly, to the creation of links in such an operating system.
2. Description of the Related Art
Computers generally perform their most basic functions in accordance with their “operating system.” An operating system is a program that runs other programs known as “applications programs,” such as a word processor, invoked by the computer's user. The operating system also performs the elementary tasks associated with the computer's use, such as receiving input from the keyboard, sending output to a display or a printer, and controlling peripherals such as disk drives and printers. In some computers, the operating system might perform advanced tasks, such as maintaining security. Exemplary operating systems currently used include Windows® (a trademark of Microsoft Corp.), the Microsoft Disk Operating System (MS-DOS®) (a trademark of Microsoft Corp.), OS/2® (a trademark of IBM.), Linux® (a trademark of William R. Della Croce, Jr.), and UNIX® (a trademark of UNIXSYSTEM LABORATORIES, INC.).
UNIX is one popular operating system. The UNIX operating system is a “layered” operating system, and may be conceptualized as a plurality of concentric rings. The innermost ring, or the core, is the computer's hardware that physically executes the instructions of the software that comprises the two outer rings or layers. The outermost rings are called the “kernel” and the “shell,” respectively. Applications programs are invoked and executed in the shell, or outermost ring, and the kernel controls the hardware, i.e., the innermost ring, to implement the instructions given by applications programs executing in the shell.
The kernel can be viewed as the “interface” between the applications programs and the hardware such that the applications programs in the shell never deal directly with the hardware. The kernel and the applications programs communicate through “system calls,” which are requests by the applications programs for the kernel to perform specified services. Exemplary services that might be provided through system calls include accessing a file; manipulating a file by opening, closing, reading from, writing to, linking to, or executing the file; moving a file; enabling access to hardware devices; and managing system resources. However, there are many other types of system calls.
The kernel generally tracks files using “i-nodes.” Each file has an i-node containing information about that file. For instance, the i-node may specify the ownership, creation date, last access date, last modification date, permissions, and the physical locations of the data blocks for the associated file. The kernel can then ascertain certain necessary or important information about the file in the performance of system calls.
Many system calls require one or more “links” to a file. A link is a pointer to a file. Links make it possible to reference a file by several different names and to access a file without specifying a full path for the file's location. Hard links allow two different files to show the same i-node and, hence, the same set of data blocks. Symbolic links may be conceptualized as two different files. One file contains the real data while the link itself is just a file containing the name of the real data file.
As an illustration, consider the output below generated by executing the command ls-li. The ls command is the system call for the kernel to list the contents of a directory. The suffix -li specifies that the -l and -i options for the ls command are to be implemented. These options specify an output of a ‘long’ listing including the i-node number for the file. This command is being executed on a computer system named ‘pro’, short for “production”. The output might look something like this:
1872396
-rwxr-
2 user nuucp
436
Oct 20
HardLink
xr-x
13:43
1872396
-rw-r-
2 user nuucp
436
Oct 20
RealFile.PRO
xr-x
13:42
1872397
lrwxr-
1 user nuucp
 15
Oct 20
SymbolicLink@
xr-x
13:43
−>RealFile.PRO
Each line of output corresponds to a file and includes, from left to right, the i-node, permissions, number of links, creator (i.e., user nuucp), size, creation date, and name for the file. The output also provides information on links to the files listed as is discussed below.
The above example shows an output for each of three files. The file named RealFile. PRO is a file that a user created using a text editor and is a standard UNIX file. The file named HardLink is a “hard” link to the file RealFile.PRO, evidenced in that the i-node number (column 1) is the same for both files. Also, the link count (in column three) is 2, indicating that there are two files in this file system that are referencing the same i-node number. The file named SymbolicLink is a link to the file named RealFile.PRO. Notice that the first letter in the second column is an l, which stands for link. Notice also that column six is the file size which in this case is 15 bytes. If one were able to look at the real contents of this file, it would be RealFile.PRO. However since the kernel knows this is a symbolic link, it treats the contents of the file as the name of the ‘real’ file to access. The name of the link and the name of the real file can be entirely different.
There are differing limitations and advantages to hard links and symbolic links. First, for a hard link, the two file names must be in the same file system. Second, a directory may not be the target of a hard link. However there are two advantages to hard links as well. The data contained within the two files is identical and will stay identical. Also, no extra disk space is occupied since the two file names actually reference the same data blocks. There are advantages and disadvantages to symbolic links as well. Symbolic links can cross file system boundaries. Symbolic links can point to directories. Symbolic links require only an i-node entry and do not occupy any real data blocks. However symbolic links can also be misconfigured and set to point to a non-existent file.
The present invention is directed to the resolution of one or more of the problems set forth above.
SUMMARY OF THE INVENTION
The invention is a method and apparatus for linking to a file in a UNIX operating system. In one aspect, the method comprises defining a virtual variable; creating a variable symbolic link referencing a file using the virtual variable; referencing the file by the virtual variable; and expanding the virtual variable to identify the referenced file. In another aspect, the apparatus includes a computer-readable, program storage device encoded with instructions that, when executed by a computer, perform a method in accordance with the invention. In yet another aspect, the apparatus includes a computer programmed to perform a method in accordance with the invention.


REFERENCES:
patent: 5193191 (1993-03-01), McKeeman et al.
patent: 5313616 (1994-05-01), Cline et al.
patent: 5339433 (1994-08-01), Frid-Nelsen
patent: 5388257 (1995-02-01), Bauer
patent: 5412808 (1995-05-01), Bauer
patent: 5574898 (1996-11-01), Leblang et al.
patent: 5832527 (1998-11-01), Kawaguchi
patent: 5848274 (1998-12-01), Hamby et al.
patent: 5905990 (1999-05-01), Inglett
patent: 5958049 (1999-09-01), Mealey et al.
patent: 5991763 (1999-11-01), Long et al.
patent: 5991860 (1999-11-01), Gross et al.
patent: 6006018 (1999-12-01), Burnett et al.
patent: 6047332 (2000-04-01), Viswanathan et al.
patent: 6119212 (2000-08-01), Gross et al.
patent: 6195650 (2001-02-01), Gaither et al.
Ford et al, “The Flux OSKIT a substrate for kerenl and language research”, SOSP CM pp. 38-51, May 1997.*
Srivastva et al, “Link time optimization of address claculation on a 64 bit architecture”, SIGPLAN ACM, pp. 49-60, Jun. 1994.*
Joyce et al, “Linking BDD based symbolic evaluation to interactive theorem proving”, ACM/IEEE Design Automation Conf. pp. 469-474, Jan. 1993.*
Law et al., “A node addition model for symbolic factorizaton”, ACM Trans.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Variable symbolic links for a file in UNIX operating system does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Variable symbolic links for a file in UNIX operating system, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Variable symbolic links for a file in UNIX operating system will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2579245

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.