Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [symlink]

symbolic link, a type of file that is a reference to another file or folder

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Python symlinks not working as Finder aliases

I'm writing some python code in JupyterLab and want to make symlinks that work in the Finder as aliases. But using the Python os.symlink command doesn't work as an alias. The Finder treats the ...
avirr's user avatar
  • 101
0 votes
2 answers
59 views

MacOS Examples hard link vs soft link in ln -s and link [closed]

Please provide some solid MacOS examples of hard link vs soft link in ln -s vs link? Is a hard link basically just a copy, whereas a soft link links to the original source? Very confused.
ina's user avatar
  • 859
12 votes
4 answers
1k views

How do I find broken symbolic links in macOS?

I would like to learn, how to find broken symbolic links, recursively given a path. Just as a precise reference of what I am looking for, the Linux equivalent (that does not work in macOS) would be ...
nostromo's user avatar
  • 197
0 votes
1 answer
85 views

What's with this /u symlink that points to /Users?

There's a symlink in my root directory called u. It points to Users. It looks like it's being created at boot time, but idk if that means anything. I don't remember this being part of a normal macOS ...
smammy's user avatar
  • 662
8 votes
3 answers
567 views

Link command in terminal vs ln vs symbolic link (ln -s) differences between them?

I've learnt about aliases and symbolic links ages ago, but only recently learnt of the link command from symbolic link vs. alias Is the link command in terminal on my MacOS - version is Sonoma 14.4.1 ...
avenas8808's user avatar
2 votes
1 answer
75 views

Remap standard ~/User folders Pictures, Documents etc to a different drive while keeping the *special* Finder Sidebar icons

Does anyone know of a definitive modern (Ventura-onwards) solution to moving the standard folders in a user directory to a different drive, NOT moving the ~/User directory itself, but moving ~/...
a person's user avatar
0 votes
0 answers
228 views

After running `brew upgrade` in macOS 14.3, I got this error while installing numpy: 'Error: The `brew link` step did not complete successfully...'

The full error message is: ==> Pouring numpy--1.26.3.arm64_sonoma.bottle.1.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /opt/...
clarkb86's user avatar
  • 131
2 votes
1 answer
81 views

Folder contains invisible file whose name starts with ..\..\

I have a Visual Studio for Mac project folder that contains an unusual file: The file is only visible with ls -A in the terminal, and its name is ..\..\items.json: ~/Projects/Boss/Boss/bin/Debug % ls -...
Plunder Bunny's user avatar
2 votes
1 answer
119 views

Auto relative symbolic links in Mac OS X

I wanna ask if it is possible to automatically create relative symbolic links in Mac OS X ? Seems like Linux has -r option for ln to do this: https://unix.stackexchange.com/questions/10370/make-a-...
Serj.by's user avatar
  • 133
1 vote
2 answers
426 views

How to add Google Chrome to path?

I want to add Google Chrome to path under the google-chrome name so that I can execute the following command: google-chrome --version. First I tried with: sudo ln -s /Applications/Google\ Chrome.app/...
mångata's user avatar
  • 111
0 votes
0 answers
240 views

Hardlinking to $HOME/Library/Mobile Documents/com~apple~CloudDocs

How can the directory ~/Library/Mobile Documents/com~apple~CloudDocs be hardlinked to the directory `~/iCloud? The suggested answer to this question, based on the following command gln -d /Users/mpf/...
Michael's user avatar
  • 121
3 votes
1 answer
146 views

Storing Aerial Screensaver vids externally via symlink

My system drive is tiny and my second is 2TB. Therefore I would like to store the Sonoma Aerial videos on the second drive. If I use shuffle, there's approximately 57gb of them. I presumed that macos ...
biscuitstack's user avatar
0 votes
0 answers
19 views

i tried symlinking the existing package into /usr/local/bin but homebrew still keeps trying to download its own version which results in failure [duplicate]

I know from questions like Use specific local gcc and related libraries with Homebrew that this apparently isn't something easy to do, but that particular question seems to have been resolved with &...
SubtleHyperbole's user avatar
1 vote
2 answers
122 views

Reveal Symbolic Link in Finder, NOT the file it resolves to?

I wrote the following script to select copied/pasted Finder items in the target folder I pasted them into. tell application "Finder" set thePath to POSIX path of (insertion location as ...
Max Well's user avatar
  • 299
1 vote
1 answer
180 views

Mac how to delete broken symlink in Mac trash

In the Trash folder on my Mac I have the following directory that contains a symlink I can't delete called X11R6 (/Users/gcn/.Trash/temp/Previously Relocated Items/Security/usr/). I've tried a variety ...
JerryN's user avatar
  • 111
2 votes
1 answer
664 views

How to fix broken symbolic link in an M1 Mac?

file /Users/gani/.local/pipx/venvs/aws-sso-util/bin/python /Users/gani/.local/pipx/venvs/aws-sso-util/bin/python: broken symbolic link to python3.10 Here is more info: ls /Users/gani/.local/pipx/...
Bear Bile Farming is Torture's user avatar
0 votes
0 answers
304 views

Why does my DYLD_LIBRARY_PATH makes dynamic linker see a dylib that`ls` does not show me?

How did adding /usr/lib/ to my DYLD_LIBRARY_PATH cause this dynamic linking problem on my MacOS Ventura M1 MBP? I had set export DYLD_LIBRARY_PATH="...:/usr/lib:..." in my .bash_profile. $ ...
Jason Hemann's user avatar
1 vote
1 answer
91 views

Did 13.4 change handling of symlinks? [closed]

Some scripts that have been working well for months failed miserably today. I am not completely certain what's going on; perhaps someone else can confirm or refute what I think I've found: Formerly, ...
WGroleau's user avatar
  • 5,065
1 vote
0 answers
148 views

Why won't my iCloud symlinks for ~/Desktop and ~/Documents show up in Finder?

TL;DR I can't see the symlinks to my iCloud-synced Desktop and Documents folders in my home directory when using Finder. I have some work-arounds, but want to understand and solve the underlying ...
CodeGnome's user avatar
  • 393
1 vote
1 answer
1k views

Get Homebrew to re-create executable symlinks for an installed package (ghostscript)?

I am trying to re-install/re-link Ghostscript from Homebrew. I previously had it installed from Hombrew and working fine, but recently I installed MacTeX 2023, and it seems that it replaced the ...
PLL's user avatar
  • 997
0 votes
0 answers
78 views

macOS files "connected" but no symlink?

Disclaimer I’m not sure how to even phrase the issue here. So if you find a better way, please comment it, I’ll edit the question. I don’t know either if it’s a LyX or macOS related question. So ...
Louis's user avatar
  • 101
2 votes
1 answer
8k views

How can I set Python symlink in MacOS Ventura?

I am trying to set a symlink so that I can point the python command in Terminal to a new install of python3. I last did this in Mojave, where one could disable csrutil and then run the following ...
Parapluie's user avatar
  • 447
0 votes
3 answers
2k views

How to point to a file in a different folder on iOS/iPadOS?

On my iPad, I use iCloud Drive and the Files app. My files are organized in folders in iCloud Drive so that I can access them on all of my devices. I frequently want to point to a file that is stored ...
John's user avatar
  • 565
1 vote
1 answer
171 views

Create a link from one directory to another

I have two accounts on the same Mac. The first account has two directories myScripts and downloads that I want to use from the second account. myScripts is on the environment path, so I can run the ...
Duck's user avatar
  • 2,494
1 vote
4 answers
1k views

How to symlink Mac OS' own folders (Monterey)?

I am looking for a way to accomplish the following on Monterey (12.6): In the past I would symlink some Mac OS system folders (Documents, Downloads and Desktop) to folders already synced to a Synology ...
nail's user avatar
  • 11
1 vote
1 answer
274 views

Does the "realpath" command in /bin resolve firmlinks as well as softlinks?

Some macOS installations include the Unix realpath command and some do not. I haven't been able to discern an accurate pattern of which versions have it. I'm on an M1 Air with Monterrey 12.6 and Xcode ...
hippietrail's user avatar
  • 1,404
1 vote
1 answer
4k views

Creating a symlink doesn't work. How do I create it?

OS version: ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79 Command Line Interface: zsh 5.8.1 (x86_64-apple-darwin21.0) Steps to reproduce $ cd /usr/bin $ ln -sf whatever_exist ...
luilver's user avatar
  • 11
0 votes
2 answers
998 views

Do I need to reinstall my OS due to Ruby?

After trying to upgrade my flutter apps dependencies failed, I've seen a command in the call stack and tried to run it. Now I think I screwed up my local ruby installation with my workarounds. I would ...
Flajt's user avatar
  • 1
1 vote
2 answers
3k views

Multiple versions of the same Python installed

I installed Python3 via brew: brew install [email protected] And following the symlink chain of which python3 leads to: $ which python3 /usr/local/bin/python3 $ ls -l /usr/local/bin/python3 lrwxr-xr-x 1 ...
emonigma's user avatar
  • 1,019
1 vote
0 answers
712 views

iPhone backup symlink to external drive doesn't work after creation

I made an iPhone backup on my MacBook and then copied the backup folder to an external drive. I then created a symlink between the two using the following terminal command: ln -s /Volumes/'TOSHIB EXT'/...
python newbie's user avatar
0 votes
2 answers
643 views

Configure Spotlight to follow symlinks or search multiple paths

When using the search box in a Finder window, I would like to configure Spotlight so that a search will follow symlinks in the directory tree below the folder being searched. For example, I symlinked ...
SpinUp __ A Davis's user avatar
1 vote
0 answers
372 views

How to change the backup location of multiple iOS devices using symlink?

This article outline the steps to take in order to move your iPhone or iPad backups to an external hard drive... https://www.imore.com/how-move-your-iphone-or-ipad-backups-external-hard-drive What I'm ...
A. Ro's user avatar
  • 151
0 votes
0 answers
142 views

Delete Symlink from ~/Desktop

A while ago I deleted my ~/Desktop directory and then (using a symlink) pointed it to another directory (a subdirectory of my Google Drive directory). No, that my setup has changed, I would like to ...
Maximilian C.'s user avatar
2 votes
1 answer
313 views

What is the purpose of pythonwrapper, and how can I distinguish it from an executable Python interpreter?

I have a Bourne script that takes a Python command (Python interpreter and arguments) and reroutes it to a custom Python interpreter. I want to make sure that modules that would be on the path of the ...
Alan's user avatar
  • 123
0 votes
2 answers
668 views

How can I ensure photo folders are synced to iPhone in correct time order?

I'm syncing some local folders so they appear as albums "From my Mac" in my iPhone Photos app. It works, but the ordering is wrong. The files in the local folders are actually symlinks into ...
Tim's user avatar
  • 111
3 votes
2 answers
4k views

How to make iCloud Drive conveniently available to the shell

For whatever reason, Apple has decided to make "iCloud Drive" actually available at an impossible-to-remember and painful-to-type location. Is there any better method than a symlink to make ...
iconoclast's user avatar
  • 10.1k
1 vote
1 answer
254 views

How can I find out which file(s) links to another file

This is a question about the reverse of a file link, which I can easily see in either Terminal or Get Info, ie. this lrwxr-xr-x 1 Alex admin 35 7 Aug 23:35 envsubst -> ../Cellar/gettext/...
Alex Ixeras's user avatar
  • 1,386
0 votes
1 answer
350 views

ln symbolic link command error - iphone bu symbolic link troubleshoot

Having problem changing iphone backup location (following this tutorial https://www.iclarified.com/72786/how-to-change-your-iphone-backup-location-mac) cannot interpret the error - any help ...
bbyfrn's user avatar
  • 1
0 votes
2 answers
180 views

How do I get my documents folder back from an external drive?

A while ago, I moved my Documents folder to my external drive to save space on my mac using this tutorial: Open Terminal Type in cd /Users/Your User ID/ Then ln -s /Volumes/External Drive Name/...
Hannah's user avatar
  • 1
5 votes
3 answers
15k views

Homebrew suggests there's always an existing formula for node installed?

I am trying to install node to use with reactjs. I started with node 16 but found it was incompatible with node-sass, so I've downgraded to node 14. When installing (brew install node@14), it remains ...
biscuitstack's user avatar
2 votes
1 answer
2k views

Allow symbolic links in SMB file sharing

I symlink directories I want to share into ~/Base/shared. I have enabled File Sharing (via SMB) on this directory, but symlinks are shown just as links and are not followed to their target (you can ...
HappyFace's user avatar
  • 652
4 votes
2 answers
7k views

macOS Cannot Create Valid Symlink From Terminal Using Relative Paths

Using the following snippet it creates an invalid symlink. But according to other answers it should work fine. # make a temp dir and save path to var. # set dir (mktemp -d) # fish shell only! dir=$(...
user14492's user avatar
  • 1,074
0 votes
1 answer
66 views

Is there a way to view just symbolic links that I've created?

I've noticed my iCloud storage is full even though I only have roughly ~2GB of data in there. When I view my iCloud storage I notice that both my desktop and my documents seem to be listed twice - ...
Nick's user avatar
  • 469
0 votes
0 answers
315 views

Replace symbolic links to libraries in executable with full path

Because I use homebrew to manage my packages but I compile ffmpeg by myself (I need to enable some components that is not included in the homebrew build), when homebrew upgrades one of its formulas ...
Joy Jin's user avatar
  • 2,833
1 vote
0 answers
48 views

Fixing symlinked /Users directory

I had my previous Mac Mini configured where /Users was a link to a separate volume on my dual disk system. I tried upgrading to Catalina on that machine and discovered that this link caused the ...
Donald Hosek's user avatar
1 vote
1 answer
728 views

What casues macOS sidebar to drop "favorites" (shortcuts to linked files/directories), other than macOS updates? How to prevent?

Every month or so my Macs drops all the favorites I have in the Finder windows (which also appear in Save/Open system dialogue windows). I takes time to redo them, and it is frustrating. I know that ...
wide_eyed_pupil's user avatar
0 votes
0 answers
29 views

How do I publish symlinks as regular files over SMB3? [duplicate]

I have this file that's dropped in a Mac via rsync, then Windows fetches it but it needs it to be named differently according to use, so the obvious answer, I thought, was to symlink it into all of ...
Vita's user avatar
  • 303
1 vote
1 answer
75 views

hardlinks: does "original" mean anything?

man rdfind discusses the rules to decide which file is the original when it finds a duplicate. When all the others are hard links to the "original," does that really mean anything? I ...
WGroleau's user avatar
  • 5,065
1 vote
0 answers
75 views

How to create device file symlink

ok - bit convoluted, but I'm creating a tool that emulates a GPS device. Combination of C code and a tool called SOCAT. SOCAT reads a udp port and passes the data to my C Code which decodes the data ...
Mark's user avatar
  • 111
1 vote
1 answer
163 views

Strange behaviour of symlink /var

I have a pretty new MacBook and got this from our central IT department pre-installed. I experienced a problem, which I first thought was related to Terraform, but after investigation this seems to be ...
Smoki's user avatar
  • 111

1
2 3 4 5