> For the complete documentation index, see [llms.txt](https://igb.mit.edu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://igb.mit.edu/mini-courses/introduction-to-unix/files/symbolic-links.md).

# Symbolic Links

UNIX filesystems have a feature called symbolic links, which are files that point to another file, called the target. They're similar to shortcuts in Windows.

There are two kinds of symbolic links: hard links and soft links.

## Hard Links

Hard links create a file which points to the same space on the hard drive as the file which is being linked to, rather than to that file itself.

```
/home/me/file      /home/you/file
    |                    |
 hard link           hard link
    |                   ,'
    V               _.-`
HARD DRIVE <....--``
```

A file won't be deleted until every hard link to it is deleted.

To create a hard link, you use the `ln` command with the source file, and the target hard linked file:

```bash
ln arrayDat.txt arrayHard.txt

ls
```

Notice that any changes you make to `arrayDat.txt` will be reflected in `arrayHard.txt`.

## Soft Links

Soft links create a file which points to the original file or directory.

```
/home/me/file <---Soft link--- /home/you/file
     |
     |
     V
HARD DRIVE
```

Soft links break if the original file is deleted.

To create a soft link, you use the `ln` command with the `-s` flag.

```bash
ln -s arrayDat.txt arraySoft.txt

ls -l
```

Notice that any changes you make to `arrayDat.txt` will be reflected in `arraySoft.txt`. The `ls` command will show that `arraySoft.txt` points to the file `arrayDat.txt`.

Your Luria home folder has a couple of soft links automatically set up pointing to storage servers so that common programs don't take up too much space on the head node.

[Luria Cluster](/computing-resources/luria-cluster.md#home-directory)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://igb.mit.edu/mini-courses/introduction-to-unix/files/symbolic-links.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
