Questions tagged [symlink]

A special type of file that references an inexistent or existing file or directory. The contents of a symbolic link consist of an arbitrary string that is the path to the file that the symbolic link points to. When the symlink is encountered during pathname resolution, the string stored by the file is used to modify the pathname resolution.

Filter by
Sorted by
Tagged with
2 votes
2 answers
153 views

Are library symlinks used to load libraries?

I had someone tell me this, "I do know the symlinks are not used on linux when loading a library." However, this does not seem correct to me. Too often I have had to fix broken symlinks when ...
  • 313
0 votes
2 answers
97 views

gdbus symbol look up error

I'm using Archlinux. After a recent update, I find that the gdbus doesn't work and it presents a symbol lookup error: ➜ tidedra@ZgrArch ~ gdbus gdbus: symbol lookup error: /usr/lib/libgobject-2.0.so....
1 vote
0 answers
40 views

Accessing .. under a symlink

I have a script that makes an environment using symlinks, and then calls a process that uses ../ to navagate to other parts of that environement. Unfortunately since it uses symlinks .. refers to the ...
  • 141
0 votes
1 answer
27 views

What does "resolve symlink" mean?

Im confused about this bash option: -P If set, do not resolve symbolic links when performing commands such as cd which change the current directory. The physical directory is used instead. By default,...
0 votes
1 answer
40 views

Is there a way to combine multiple folders into one folder using symlinks?

At my work we generate a lot of data for analysis, such that we have to keep purchasing new NASs for data storage. This has created a situation where on our computational servers we have many NASs ...
  • 101
0 votes
0 answers
26 views

what is the right way to use a symbolic link?

There are many ways to create and remove the symbolic link but there is no website how to use this I think. joshua9900@JY-NAM:~/a$ tree . ├── b │   └── c │   └── home_link -> /home/joshua9900/a/...
0 votes
1 answer
39 views

Symlinking a .desktop files compresses the file

I am trying to install an application needed for my university. Whenever I am trying to symlink the .desktop file from original folder, it somehow compresses it and then puts it in the .local/share/...
  • 3
0 votes
0 answers
32 views

Atomically replace directory with a link to itself

Bit of a niche question this, but I want to atomically replace a directory with a symlink to itself under a different name. Specifically, I have a directory ./node_modules, and I want to move it to ./...
  • 101
3 votes
2 answers
343 views

Is SSD performance hindered by access to folder on SSD via symlink on conventional spinning rust HD?

I prefer to keep my OS and applications on one partition and /home/ on another. I intend to replace the current / drive with an SSD, then symlink /home/myuser/.local/ to a directory on the SSD because ...
  • 15.2k
5 votes
2 answers
630 views

Does POSIX guarantee that all its shell utilities will resolve symbolic links where a file is expected?

For POSIX shell utilities which take one or more files as arguments, does POSIX guarantee that a symbolic link can be passed instead (and that the utility will resolve it)? Is it documented somewhere?
  • 546
2 votes
0 answers
33 views

Rsync between systems with different symlink permission semantics (MacOS -> Ubuntu)?

I’d like to use rsync for backup of a MacOS machine to an Ubuntu server running ZFS. The problem is that on MacOS symlinks can have file permissions distinct from their referenced file; whereas on ...
3 votes
1 answer
227 views

Why do certain programs or systems rely on symlinks?

Context As I was navigating through the file-system to find the persisted files from a mounted docker volume, I found it difficult to unravel the unending ls/cd/tree of directories only to find more ...
0 votes
0 answers
18 views

How can I mount one network share into the mount of another permanently?

I have a system that mounts several network shares through systemd. A dummy systemd unit with RequiresMountsFor them and thus mounts them after the network-online service. I need a directory from one ...
  • 131
-1 votes
1 answer
63 views

How to make git traverse soft symlinks?

Is there any way at all to make Git traverse a symlink and treat it as the destination file? I don't want to use hardlinks, they don't work across filesystems and can't be used for directories. I don'...
  • 321
1 vote
1 answer
48 views

Symbolic Link seems to be Contradictory when dealing with `../`

The contradiction here is how symlink deal with directory ../ in 2 ways: treat the current path as the result printed by pwd treat the current path as absolute path I will discuss them with an ...
  • 115
0 votes
1 answer
40 views

Symlinked executable can't find dependencies

OS.: Ubuntu 22.04 Scenario In the Home folder I created a folder called bin. In this folder I clone the GitHub repositories I need. For example, I cloned this golang repository in my bin folder (the ...
  • 103
0 votes
2 answers
125 views

Creating symlink without getting the error "Too many symbolic links"

It happens very often if I want to create a symlink: I'm getting the error Too many symbolic links. What does this mean and why can I only solve this error when I'm in the dir where I want to create ...
0 votes
1 answer
62 views

Path resolution depending on pwd (symlinked dirs)

This sort of situation often occurs under the /sys/bus tree (bash-5.1) : Let's say I get some foo directory listing several symlinks to other directories, ls -ails pathto_foo displaying something of ...
  • 5,845
1 vote
0 answers
191 views

How to use symbolic links on shared NFS drives?

I have two machines on the same network, and both of them have mounted the same external NFS file system (an efs from AWS), at the mount point /mnt/efs/fs1. I want to do a symbolic link from both ...
  • 13
0 votes
0 answers
47 views

Multiple USB Modems - Binding cdc-wdmx to symlink

First question here, long story short I have 3 different USB Cellular(GSM) modems and I want to ensure the connection profiles for each SIM (as the APNs differ) always go to the same modem/sim combo. ...
-1 votes
1 answer
53 views

Editing a broken symlink is relinking it to the previously deleted target file

I have a symlink file4.txt that was linked to a target file(file3.txt) initially. Once I removed the target file, my symlink got broken as expected as shown in image below. But, when I try to write ...
0 votes
1 answer
132 views

How to suppress the impact of 'File system loop detected' warnings on the exit status of the 'find' command?

I use find command to find all regular files older than some number of minutes in a directory tree containing some symbolic links that need to be resolved: find -L . -type f -mmin +300 -print But ...
0 votes
1 answer
34 views

Why is py linked to __main__.py and not python3?

I've recently moved from Windows to Ubuntu in a container. From Windows I'm used to running $ py myScript.py However this wasn't working as expected in Ubuntu, so have been using $ python3 myScript....
2 votes
1 answer
44 views

Find all symlinks but tell which are to files and which to directories

I want to find all the symlinks in a directory structure, and be able to tell the difference between which are links to files and which to directories. This command does everything I need except ...
  • 121
0 votes
1 answer
52 views

Find symbolic links leading to symbolic links

I want to find symlinks that contain only multiple soft links. I know how to list all files containing soft links but I want to show only files that contain multiple soft links
0 votes
1 answer
79 views

Symlinks from /home subdirs to mount drive break on reboot

My Kubuntu workstation has an SSD and an HDD. The SSD contains the Kubuntu installation, while I would like to use the HDD for general storage where drive speed is not a concern. I have the HDD ...
  • 1
0 votes
0 answers
8 views

symbolic links do not permit access to them

I have a directory with the following folders: /data1/mydata and /home/me/workdir/ I wanted the mydata to be available in the workdir directory so I did ln -s /data1/mydata mydata from the workdir ...
0 votes
1 answer
42 views

Soft link will pass filename as 1st parameter to target?

https://github.com/adurbin/iotools Original usage is: ./iotools rdmsr x xxxxx when I doing: ln -sf iotools rdmsr then I can do: rdmsr x xxxxx Why?? because when doing soft linking, it will pass the ...
  • 679
0 votes
1 answer
272 views

symlink doen't works with nginx and php-fpm and docker

I run a wordpress site in local wiht docker, and in a plugin I send a GET request for a style.css file, which is a symlink, and it doesn't work, it answer a 404 not found I don't think the probleme is ...
  • 111
1 vote
1 answer
50 views

how many layers of symlink can linux resolve

I am reading The Linux Programming Interface, this book says: SUSv3 requires that an implementation allow at least _POSIX_SYMLOOP_MAX dereferences of each symbolic link component of a pathname. The ...
  • 121
0 votes
2 answers
60 views

Effect of slash (/) suffixes on symlink names for `ls` with the `-F` option

By way of example, I have a directory structure like this: $ \ls -F dir/ lnk@ $ \ls -F dir FILE $ \ls -l lnk lrwxrwxrwx 1 user group d Mon hh:mm lnk -> dir My ls command is aliased. I am using \...
1 vote
1 answer
30 views

Create symboling link under same folder

test ---> First ------> Inside-First ----------> Cool1 ---> Second ------> Inside-Second ----------> Cool2 I want to create a symbolic clink between Inside-First to Inside-Second ...
0 votes
0 answers
51 views

How to make rsync copy the contents of symbolic link FILES but only copy the symlink file for directories?

I found that I can use the -L option to copy the contents of all symbolic links, including directories. However, I need only to copy the referent files pointed to by symbolic links, and copying entire ...
  • 101
0 votes
0 answers
33 views

Vulnerability of symlink overwriting

On my distro, /sbin is symlinked to /usr/sbin. What is stopping a malicious program from overwriting that link to point to somewhere else and waiting for a superuser to execute something to obtain ...
  • 29
2 votes
0 answers
151 views

Current Linux support for symbolic links (symlinks) for NTFS 3.1

Symbolic links have been expanded in Windows, previously available only through administrative privileges. Linux is documented as supporting NTFS 3.1, the version shipped in Windows 10. What ...
0 votes
4 answers
105 views

Re-cd into current directory

I am in a directory which is a symlink me@hostname:/home/me$ ls -al the_link -> actual_a actual_a actual_b actual_c me@hostname:/home/me$ cd the_link me@hostname:/home/me/the_link$ Now while I've ...
1 vote
0 answers
335 views

How to make nginx access symbolic path without permission issue

I created a symbolic link path in nginx server side which reference to my documents directory [user1@localhost nginx] pwd /user/share/nginx [user1@localhost nginx] sudo ln -s ~/Documents/nginx-sites/...
  • 33
0 votes
0 answers
122 views

Allow systemd static IP edit in read-only Yocto file system

I have a custom recipe that copy a systemd .network configuration file in /etc/systemd/network, setting a static IP to my system. Since many devices can be connected to the same network, I'd like the ...
  • 101
0 votes
1 answer
579 views

Too many levels of symbolic links issue

Whenever I attempt to cd my Downloads folder to run a C# program that I have written, I keep getting this message. When I try moving the file to snap and/or socket (the only two which are responding ...
1 vote
1 answer
68 views

zsh: ignore symbolic links in completion list returned by _files

I am new to writing zsh completions. How can I ignore symbolic links from showing in completion returned by _files -W /path/to/folder/?
  • 546
0 votes
2 answers
232 views

Change permissions on symbolic link [duplicate]

I'm starting in programming with multiple exercices and I don't know how to change my link permission (lrwxrwxrwx to lrwxr-xr-x). I have already searched solutions from Google and Youtube but nothing ...
  • 1
0 votes
1 answer
80 views

How can I symlink a folder and change its name?

I'm working in a monorepo and I want the example for my packages to be separated from the packages in a structure as follows: my_packages_collection/ examples/ foo/ ... packages/ foo/ ...
0 votes
0 answers
446 views

ImportError: No module named 'lsb_release'

While I was trying to fix the ImportError: No module named 'lsb_release', I accidentally performed the unlink command on /usr/share/pyshared/lsb_release.py sudo unlink /usr/share/pyshared/lsb_release....
0 votes
0 answers
56 views

Why is this command creating nested symlinks?

I have the following folder structure folder1 --2022.01.01 --folderA --folderB --2022.01.02 --folderA --folderB --2022.01.03 --folderA --folderB I want to have the following structure ...
0 votes
0 answers
86 views

prevent rsync replacing symbolic links with new files in the target directory

When I try to rsync directory1 to directory2 that have symbolic files that point to the same files in directory1, rsync replace all the symbolic files with real files. I tried to add -L but it didn't ...
  • 3
0 votes
0 answers
30 views

Symlink folders delete themselves

I have two symlinks pointing to two folders inside var/www on my server, and for some strange reason, those two folders get deleted. Checking the server command history, there is no record of any ...
  • 101
0 votes
1 answer
32 views

rsync treat symlinked dir on receiver as dir only if it's not modified otherwise it will copy the dir

I want to keep the soft link if there is no diff between the files, and if there is a difference I want to copy the directory. I am using rsync -rk src dis in src I have directory:dir1 that have ...
  • 3
0 votes
1 answer
197 views

How to `sudo cat` the contents of a symlink

I have created a symlink foo to the file /bar/baz using $ ln -s /bar/baz foo $ ls foo Here /bar/baz is a log file that only root has read permissions for. Now I would like to print the contents of /...
  • 101
1 vote
1 answer
124 views

Avoid symlink race rcondition with "mv" in Bash

I want to safely write to a destination file (as root, unter common Linux'es) with "echo" (or catany other Bash built-in stuff) like this echo "foo" > /destination/dir/filename ...
0 votes
2 answers
72 views

How to get 'man gfind' when I enter 'man find'?

On my new-ish mac os/Darwin system, my find tool is an 11-year-old BSD version. I have used MacPorts to install a more current version: GNU's find, which MacPorts has named gfind, and placed in /opt/...
  • 2,404

1
2 3 4 5
23