https://github.com/mostlygeek/path.to.sh
make /path/to real.
https://github.com/mostlygeek/path.to.sh
Last synced: 12 months ago
JSON representation
make /path/to real.
- Host: GitHub
- URL: https://github.com/mostlygeek/path.to.sh
- Owner: mostlygeek
- License: apache-2.0
- Created: 2025-05-29T18:50:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-29T19:15:04.000Z (about 1 year ago)
- Last Synced: 2025-05-29T20:28:02.625Z (about 1 year ago)
- Language: Shell
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# path.to.sh
`path.to.sh` is a simple shell script to populate `/path/to/...` with symlinks to actual files.
It does only 3 things:
1. creates the `to/DIRECTORY` subdirectory
2. Remove any broken symlinks
3. Creates symlinks to files matching provided pattern. Duplicates are skipped. ¯\(ツ)/¯
## But why...?
I've been sharing a lot of [llama-swap](https://github.com/mostlygeek/llama-swap) configuration examples. Manually replacing my local paths with `/path/to/file.gguf` is annoying. So why not just make the `/path/to/file.gguf` actually work? `#lazy`
## Install
```sh
$ sudo mkdir -p /path/to
$ sudo chown -R $USER:$USER /path
$ cd /path
$ curl -LO 'https://raw.githubusercontent.com/mostlygeek/path.to.sh/refs/heads/main/path.to.sh'
$ chmod +x path.to.sh
```
## Usage
`./path.to dirname /path1 /path2 /pathN 'file-name-pattern*.gguf`
Example:
```sh
$ ./path.to.sh models /mnt '*.gguf'
1. Removing broken symlinks in 'to/models'
2. Searching for files matching pattern: *.gguf
- Linking: /mnt/nvme/models/unsloth/llama-4/UD-Q4_K_XL/Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00002-of-00002.gguf
- Linking: /mnt/nvme/models/unsloth/llama-4/UD-Q4_K_XL/Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00001-of-00002.gguf
- Linking: /mnt/nvme/models/Llama-3.2-3B-Instruct-Q4_K_M.gguf
- Linking: /mnt/nvme/models/Qwen3-30B-A3B-UD-Q4_K_XL.gguf
- Linking: /mnt/nvme/models/Llama-3.3-70B-Instruct-Q4_K_M.gguf
- Linking: /mnt/nvme/models/Qwen2.5-Coder-7B-Instruct-Q4_K_M.gguf
- Linking: /mnt/nvme/models/Qwen2.5-Coder-7B-Instruct-Q8_0.gguf
- Linking: /mnt/nvme/models/Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf
...
$ ls -l to/models/
total 56
lrwxrwxrwx 1 mostlygeek mostlygeek 47 May 29 12:00 bge-reranker-v2-m3-Q4_K_M.gguf -> /mnt/nvme/models/bge-reranker-v2-m3-Q4_K_M.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 83 May 29 12:00 CohereForAI_c4ai-command-a-03-2025-Q4_K_L-00001-of-00002.gguf -> /mnt/ssd-extra/models/CohereForAI_c4ai-command-a-03-2025-Q4_K_L-00001-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 83 May 29 12:00 CohereForAI_c4ai-command-a-03-2025-Q4_K_L-00002-of-00002.gguf -> /mnt/ssd-extra/models/CohereForAI_c4ai-command-a-03-2025-Q4_K_L-00002-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 60 May 29 12:00 google_gemma-3-27b-it-Q4_K_L.gguf -> /mnt/nvme/models/bartowski/google_gemma-3-27b-it-Q4_K_L.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 50 May 29 12:00 Llama-3.2-3B-Instruct-Q4_K_M.gguf -> /mnt/nvme/models/Llama-3.2-3B-Instruct-Q4_K_M.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 51 May 29 12:00 Llama-3.3-70B-Instruct-Q4_K_M.gguf -> /mnt/nvme/models/Llama-3.3-70B-Instruct-Q4_K_M.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 101 May 29 12:00 Llama-3.3-70B-Instruct-Q6_K_L-00001-of-00002.gguf -> /mnt/ssd-extra/models/Llama-3.3-70B-Instruct-Q6_K_L/Llama-3.3-70B-Instruct-Q6_K_L-00001-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 101 May 29 12:00 Llama-3.3-70B-Instruct-Q6_K_L-00002-of-00002.gguf -> /mnt/ssd-extra/models/Llama-3.3-70B-Instruct-Q6_K_L/Llama-3.3-70B-Instruct-Q6_K_L-00002-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 105 May 29 12:00 Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00001-of-00002.gguf -> /mnt/nvme/models/unsloth/llama-4/UD-Q4_K_XL/Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00001-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 105 May 29 12:00 Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00002-of-00002.gguf -> /mnt/nvme/models/unsloth/llama-4/UD-Q4_K_XL/Llama-4-Scout-17B-16E-Instruct-UD-Q4_K_XL-00002-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 60 May 29 12:00 Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf -> /mnt/ssd-extra/models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 58 May 29 12:00 Meta-Llama-3.1-8B-Instruct-Q8_0.gguf -> /mnt/ssd-extra/models/Meta-Llama-3.1-8B-Instruct-Q8_0.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 76 May 29 12:00 Mistral-Large-Instruct-2407-Q4_K_S-00002-of-00002.gguf -> /mnt/ssd-extra/models/Mistral-Large-Instruct-2407-Q4_K_S-00002-of-00002.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 72 May 29 12:00 mmproj-Qwen_Qwen2.5-VL-32B-Instruct-bf16.gguf -> /mnt/nvme/models/bartowski/mmproj-Qwen_Qwen2.5-VL-32B-Instruct-bf16.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 48 May 29 12:00 nomic-embed-text-v1.5.Q8_0.gguf -> /mnt/nvme/models/nomic-embed-text-v1.5.Q8_0.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 53 May 29 12:00 qwen2.5-0.5b-instruct-q8_0.gguf -> /mnt/ssd-extra/models/qwen2.5-0.5b-instruct-q8_0.gguf
lrwxrwxrwx 1 mostlygeek mostlygeek 54 May 29 12:00 Qwen2.5-32B-Instruct-Q4_K_M.gguf -> /mnt/ssd-extra/models/Qwen2.5-32B-Instruct-Q4_K_M.gguf
...
```
## Contributions
Sorry ... nope. Feel free to fork and maintain your own. :)