When you create a hard link, you're just adding a
name-number pair to a directory. When you delete a file, you're just
removing a hard link from a directory.
Types of Files
One detail we've been concealing up to now is that the Linux kernel
considers nearly everything to be a file. That includes directories and
devices: They're just special kinds of files.
As you may remember, the first character of an ls -l display represents
the type of the file. For an ordinary file, this will be simply -. Other
possibilities include the following:
d
directory
l
symbolic link
b
block device
c
character device
p
named pipe
s
socket
Symbolic Links
Symbolic links (also called ``symlinks'' or ``soft links'') are the other
kind of link besides hard links. A symlink is a special file that ``points
to'' a hard link on any mounted filesystem. When you try to read the
contents of a symlink, it gives the contents of the file it's pointing to
rather than the contents of the symlink itself.
Pages:
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193