mirror of
git://slackware.nl/current.git
synced 2025-01-13 08:01:53 +01:00
75a4a592e5
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
105 lines
4.4 KiB
HTML
105 lines
4.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
|
<title>Links</title>
|
|
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
|
|
<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
|
|
<link rel="UP" title="Filesystem Structure" href="filesystem-structure.html" />
|
|
<link rel="PREVIOUS" title="Permissions" href="filesystem-structure-permissions.html" />
|
|
<link rel="NEXT" title="Mounting Devices" href="filesystem-structure-mounting.html" />
|
|
<link rel="STYLESHEET" type="text/css" href="docbook.css" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
</head>
|
|
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
|
|
alink="#0000FF">
|
|
<div class="NAVHEADER">
|
|
<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<th colspan="3" align="center">Slackware Linux Essentials</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="10%" align="left" valign="bottom"><a
|
|
href="filesystem-structure-permissions.html" accesskey="P">Prev</a></td>
|
|
<td width="80%" align="center" valign="bottom">Chapter 9 Filesystem Structure</td>
|
|
<td width="10%" align="right" valign="bottom"><a
|
|
href="filesystem-structure-mounting.html" accesskey="N">Next</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr align="LEFT" width="100%" />
|
|
</div>
|
|
|
|
<div class="SECT1">
|
|
<h1 class="SECT1"><a id="FILESYSTEM-STRUCTURE-LINKS"
|
|
name="FILESYSTEM-STRUCTURE-LINKS">9.3 Links</a></h1>
|
|
|
|
<p>Links are pointers between files. With links, you can have files exist in many
|
|
locations and be accessible by many names. There are two types of links: hard and
|
|
soft.</p>
|
|
|
|
<p>Hard links are names for a particular file. They can only exist within a single
|
|
filesystem and are only removed when the real name is removed from the system. These are
|
|
useful in some cases, but many users find the soft link to be more versatile.</p>
|
|
|
|
<p>The soft link, also called a symbolic link, can point to a file outside of its
|
|
filesystem. It is actually a small file containing the information it needs. You can add
|
|
and remove soft links without affecting the actual file. And since a symbolic link is
|
|
actually a small file containing its own information, they can even point at a directory.
|
|
It's rather common to have <tt class="FILENAME">/var/tmp</tt> actually be a symbolic link
|
|
to <tt class="FILENAME">/tmp</tt> for example.</p>
|
|
|
|
<p>Links do not have their own set of permissions or ownerships, but instead reflect
|
|
those of the file they point to. Slackware uses mostly soft links. Here is a common
|
|
example:</p>
|
|
|
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<pre class="SCREEN">
|
|
<samp class="PROMPT">%</samp> <kbd class="USERINPUT">ls -l /bin/sh</kbd>
|
|
lrwxrwxrwx 1 root root 4 Apr 6 12:34 /bin/sh -> bash
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>The <tt class="COMMAND">sh</tt> shell under Slackware is actually <tt
|
|
class="COMMAND">bash</tt>. Removing links is done using <tt class="COMMAND">rm</tt>. The
|
|
<tt class="COMMAND">ln</tt> command is used to create links. These commands will be
|
|
discussed in more depth in <a href="file-commands.html">Chapter 10</a>.</p>
|
|
|
|
<p>It's very important to be careful about symlinks in particular. Once, I was working on
|
|
a machine that was consistently failing to back-up to tape each night. Two symlinks had
|
|
been made to directories beneath each other. The back-up software kept appending those
|
|
same directories to the tape until it was out of space. Normally, a set of checks will
|
|
prevent creating a symlink in this situation, but ours was a special case.</p>
|
|
</div>
|
|
|
|
<div class="NAVFOOTER">
|
|
<hr align="LEFT" width="100%" />
|
|
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td width="33%" align="left" valign="top"><a href="filesystem-structure-permissions.html"
|
|
accesskey="P">Prev</a></td>
|
|
<td width="34%" align="center" valign="top"><a href="index.html"
|
|
accesskey="H">Home</a></td>
|
|
<td width="33%" align="right" valign="top"><a href="filesystem-structure-mounting.html"
|
|
accesskey="N">Next</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="33%" align="left" valign="top">Permissions</td>
|
|
<td width="34%" align="center" valign="top"><a href="filesystem-structure.html"
|
|
accesskey="U">Up</a></td>
|
|
<td width="33%" align="right" valign="top">Mounting Devices</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|