> For the complete documentation index, see [llms.txt](https://docs.linuxgsm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxgsm.com/linux/save-space-with-symlinking.md).

# Symlinking and ln command

Symlinks create multiple paths to a file or directory and are useful for saving space or having 1 set of files for multiple installs.

## Using Symlinks to Save Storage Space

This guide is for pointing multiple directories to the same folder using `ln` command. Ln creates hardlinks and softlinks, the -s variable creates softlinks. These can be compared to shortcuts on windows, and are going to be used in this guide.

Example guide using two "one server + one user" installs with Sven Co-op:

`Gameserver folder 1: /home/svencoop/serverfiles/svencoop_downloads/`

`Gameserver folder 2: /home/svencoop2/serverfiles/svencoop_downloads/`

`Shared folder /home/svencoop_content/svencoop_downloads/`

The command to link these would be `ln -s /shared_folder/ /gameserver_folder/`

`ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop/serverfiles/`

`ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop2/serverfiles/`

Change the game server folder ownership to be under their respective users and you are done.

`chown svencoop /home/svencoop/serverfiles/svencoop_downloads`

`chown svencoop2 /home/svencoop2/serverfiles/svencoop_downloads`

The files in the symlinks do not need be owned by the gameserver users and will not be recognized by linuxGSM's ownership check. That being said, make sure they can be read by the gameserver users.

## Symlink resources

[Excellent description of differences between Symlinks and Hardlinks by OSTechNix](https://www.ostechnix.com/explaining-soft-link-and-hard-link-in-linux-with-examples/)

[Official Ubuntu ln Documentation](http://manpages.ubuntu.com/manpages/disco/man1/ln.1.html)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.linuxgsm.com/linux/save-space-with-symlinking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
