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.

199 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
2 answers
681 views

rsync: compare directories with symlinks

There are various similar questions here, but I don't think any of them quite answer this. I have a local directory (www) which has to be mirrored exactly on a remote server, and I need to confirm ...
EML's user avatar
  • 211
6 votes
2 answers
332 views

Installing programs on a removable drive

I am planning to install some software on removable media (which will presumably always be present in the computer, though it's possible that there could be occasions where it is absent). After doing ...
Jacob Bond's user avatar
5 votes
1 answer
285 views

How do I batch-export all the content contained in symbolic links? (and then delete them all)

So as an alternative to Recursive scp without following links or creating a giant tar file? (this could be an emergency since the remote files could be deleted any time soon), I'm thinking of deleting ...
InquilineKea's user avatar
  • 6,252
5 votes
0 answers
1k views

No access to symlink folder on NTFS partition

I am using an NTFS parition for storing data I like to access both from Ubuntu and Windows 7. On my Ubuntu HOME partition, I like to link the folder Assets in order to access it from an application ...
JJD's user avatar
  • 577
5 votes
1 answer
14k views

How to solve - Failed to execute operation: Too many levels of symbolic links on CentOs 7

I am trying to install erpNext on a CentOS 7.4 VPS and I'm following the installation script here. But I get this error during installation: Processing dependencies for pip Finished processing ...
David's user avatar
  • 51
4 votes
1 answer
250 views

What could cause EROFS error for an openat call of a symlinked path, but only sometimes?

I'm trying to debug an issue which I see only intermittently, often only once or twice per server and then it goes away. I have an application which attempts to open a lock file using openat() with ...
Josh's user avatar
  • 8,419
4 votes
0 answers
424 views

How to swap a (log) file that a process has opened with a symlink to another file?

I have two processes that are writing to a log. ~/app/log/debug.log For storing logs, I created a separate disk, mounted at /mnt/logs/, it also contains a /mnt/logs/debug.log file. However, I ...
berkes's user avatar
  • 141
4 votes
0 answers
631 views

Dereference copy with KDE Dolphin

From the cli I can dereference copy a symbolic link with cp -L. Is it possible to do this with the KDE Dolphin file manager?
StrongBad's user avatar
  • 5,231
3 votes
0 answers
1k 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 ...
AndresG's user avatar
  • 33
3 votes
3 answers
5k views

link config files

Problem I'm trying to move my config files from a .dotfiles folder, and link those files to the corresponding config path. Example In this example I'm trying $ ln -s ~/.dotfiles/nvim/init.vim ~/....
Norman Perrin's user avatar
3 votes
0 answers
2k views

Absolute path to current user's home directory without using bash expansions?

This is a problem that crops up from time to time and annoys me greatly. Sometimes I need to provide an absolute path, normally in a configuration file, that should refer to the current user's home ...
sircolinton's user avatar
3 votes
1 answer
1k views

Symbolic links do not allow SELinux type_transition

Trying to access symbolic link does not allow to use SELinux type_transition. I mean that I tried to implement scheme in which user has access to a symbolic link located in /usr/bin/ and which leads ...
Dmitriy Kormulev's user avatar
3 votes
1 answer
2k views

symbol lookup error gdbus

Keep getting this error: /usr/bin/gdbus: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: g_date_copy looking at: root@server-sl:~# ldd /usr/bin/gdbus linux-...
user2239318's user avatar
3 votes
0 answers
3k views

Nested Mount Best Practice

I have two filesystems that need to be mounted on a RedHat system /apps and /apps/label. /apps will have several sub directorates and label will just have files FTP'd to it. Would it be better to ...
SpruceTips's user avatar
3 votes
0 answers
3k views

ld cannot find existing library

I'm trying to build a large application, yet for some reason linking fails and ld responds /usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libX11.so Steps I've tried: libx11-dev is correctly ...
Arthur McKnight's user avatar
3 votes
1 answer
2k views

How to make $ORIGIN in RPATH not follow symlinks?

I have an executable app, which depends on a library libbar.so and loads it via RPATH with $ORIGIN like this: $ readelf -d app Dynamic section at offset 0xe08 contains 26 entries: Tag Type ...
xealits's user avatar
  • 2,143
3 votes
0 answers
1k views

Create Symbolic Link for Windows Machines

I currently operate a SMB file server for my network and, like a lot of you guys, don't touch Windows myself. I need to create a symbolic link that will work on my user's Windows machine to \\SERVER\\...
unix's user avatar
  • 31
3 votes
0 answers
179 views

How is This Symbolic Link Not Being Followed?

I have LibreOffice Writer and OpenOffice Calc installed on my OpenSuSE system. This is arguably not ideal, but before I fully switch to one or the other, I noticed some strange behaviour when calling ...
ATG's user avatar
  • 131
3 votes
0 answers
1k views

Unison replacing newer symlinks with older files using the option -force newer

I'm having a problem with Unison and symlinks. I created a test case for making it easier to understand and try this for yourself. First, we create the two directories that will be synced. And some ...
Jorge Suárez de Lis's user avatar
3 votes
0 answers
282 views

Why do slackware packages recreate symlinks after installation?

Reading through slackware's makepkg script, I saw that rather than putting symlinks directly into the package, it deletes them and generates a script called doinst.sh that recreates them after ...
hopibel's user avatar
  • 130
3 votes
0 answers
789 views

auditing of symlink/symlinkat syscalls doesn't work here

I'm trying to monitor symlink/symlinkat syscalls of files under a specific directory, so I added two rules: auditctl -a exit,always -F arch=b64 -S symlinkat -F success=1 -F dir=/XX auditctl -a exit,...
daisy's user avatar
  • 54.4k
3 votes
0 answers
1k views

Multiple Linux or Unix Distributions, Same Home Partition or Data?

To avoid conflicts I have always installed multiple Linux and Unix distributions each with it's own home partion or directory, and in the era of 3TB hard drives this is often very practical; I also do ...
haziz's user avatar
  • 2,241
2 votes
0 answers
50 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 ...
Pat Niemeyer's user avatar
2 votes
0 answers
510 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 ...
brainchild's user avatar
2 votes
0 answers
782 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/...
jian's user avatar
  • 43
2 votes
0 answers
837 views

Symlink to python exec and the python exec have different sys paths. This causes ModuleNotFoundError

I have a project with a virtual environment.  My project structure is: $ cd /path/to/project $ tree . -L 2 . ├── venv │ ├── bin │ ├── include │ ├── lib │ ├── lib64 -> lib │ ├── pip-...
Somenath Sinha's user avatar
2 votes
0 answers
295 views

Automatic symlink to latest folder

Is there a way in Linux to automatically maintain a symlink to the latest version of a file/folder in a certain location? My use case: I generate datasets with unique job names, then write them to a ...
user913's user avatar
  • 123
2 votes
0 answers
290 views

AIX : NOFOLLOW_LINKS is not supported on this platform

I have an AIX 7.2 machine. I am trying to run a Java program on it. It gives me this error: NOFOLLOW_LINKS is not supported on this platform. It is because I am using this call in the program: Files....
Ankit Shubham's user avatar
2 votes
0 answers
67 views

Given a pathname and a symlink to a directory in the pathname, is there a command which can return an equivalent pathname making use of the symlink?

Sometimes I have a long pathname, and want to shorten it by some precreated symlink to a directory in the pathname. Specifically, given a pathname /path/to/file, and a symbolic link /symlink to a ...
Tim's user avatar
  • 101k
2 votes
0 answers
530 views

Can I access to the real path of a symbolic link in nautilus without scripts or terminal?

I made a symbolic link to a folder using the command ln. This link is located in my Desktop folder, the path of this link is as follows: /home/user/Desktop/workspace/ The real path is: /home/user2/...
JCMiguel's user avatar
2 votes
2 answers
1k views

Is there a simple way to recursively copy all symbolic links under a directory to another directory, preserving the structure?

I have a directory ~/tmp/foo/ that's populated with subdirectories, files, and symbolic links. $ tree ~/tmp/foo/ tmp/foo/ ├── eggs │ ├── baz │ │ └── link3.txt -> /home/me/file3.txt │ └── ...
Brian Fitzpatrick's user avatar
2 votes
0 answers
1k views

symlink on directory permission denied

I've created a symlink shown here; lrwxrwxrwx 1 apache apache 33 Nov 4 11:55 blog -> /var/www/blog.mysite.com Which resides in the base of this directory /var/www/www.mysite.com/ If I ...
Novocaine's user avatar
  • 175
2 votes
0 answers
53 views

Mounting USB stick in place of HDD

I'm currently working on a raspian automated box. I've connected an HDD Drive to use as a Samba server and the download and temp folder for the transmission client installed. As the HDD is noisy (and ...
n0xew's user avatar
  • 121
2 votes
3 answers
307 views

How run Linux application from a mounted Windows disk?

I have dual-boot operating system, Ubuntu and Windows 7. The problem is I can't install some Linux application on my Linux because considering the disk space. I always regret to myself why I allocated ...
meisyal's user avatar
  • 121
2 votes
1 answer
2k views

cp -a fails to copy symlinks on virtfs

Problem: Trying to copy the entire content of one directory to another which includes hidden files/directories and symlinks. This is fairly straightforward cp -a ${src} ${dst} It works as expected on ...
Fuzzy Logic's user avatar
2 votes
0 answers
691 views

Directory symlink to inode, not path (e.g. directory hardlinks)

I'm trying to better understand why directory hardlinks are not possible. Roughly, I think of directories and files as follows: directory --------- inode # exposed as . inode_of_parent # ...
Tom's user avatar
  • 121
2 votes
2 answers
86 views

Understanding and using Symlinks

I have a bit of a situation with a virtual server running some RHEL distro. The server is hosted on a Win2008 server via VMPlayer When it was created the initial partitions were set incorrectly. /...
inthesound's user avatar
2 votes
0 answers
357 views

How can I make Krusader show real size of symlinked files?

In the "size" column in Krusader, there is a link's size noted, instead of the size of the actual file. This is the same as what ls -l shows (the full address of the target file, e.g. 64 B instead of ...
BIOStheZerg's user avatar
1 vote
0 answers
38 views

eCheck if it's safe to move a directory and replace it with a symlink

Say the directory you want to move has absolute path DIR. A case where it is NOT safe: that directory has either absolute path symlinks to within DIR itself. For instance DIR/link -> /PATH/TO/DIR/...
extremeaxe5's user avatar
  • 1,183
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 ...
Hovestar's user avatar
  • 141
1 vote
1 answer
34 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 ...
user9132502's user avatar
1 vote
0 answers
162 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 ...
Mini's user avatar
  • 111
1 vote
0 answers
203 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 ...
Jeries's user avatar
  • 13
1 vote
0 answers
462 views

group symlink access denied

I have a symlinked directory that I cannot access. The other user has created a folder in their home directory and created a symlink to it in a place I can access, but I get 'permission denied'. I ...
Will's user avatar
  • 21
1 vote
0 answers
386 views

help with symbolic linking

hello im trying to make a user share folder /mnt/user/data and link it do /zfs/data. I'm trying to make both /data be the same folder so /mnt/user/data/subfolder will point to /zfs/data/subfolder. I ...
mpcllc's user avatar
  • 11
1 vote
0 answers
60 views

Embedded Linux - replacing symbolic linked file not updating

I am troubleshooting an embedded Linux system. There is a program, let's call it foo. It is symlinked to a super program, let's call it bar, similar to busybox. #ls -l foo lrwxrwxrwx .... foo -> ...
some user's user avatar
  • 239
1 vote
1 answer
2k views

Git - how to add/link subfolders into one git-repository directory

Assuming I have a file structure like this: ├── Project-1/ │   ├── files/ │   └── special-files/ ├── Project-2/ │   ├── files/ │   └── special-files/ └── Project-3/ ├── files/ └── special-...
nath's user avatar
  • 5,620
1 vote
0 answers
283 views

Resolving paths (with absolute symlinks) against a base prefix

Consider we mount a foreign directory tree under some location and then chroot into it: mount /dev/sdx1 /mnt chroot /mnt readlink /usr/bin/myapp # Outputs: /usr/libexec/myapp/run Is there any tool ...
Anton Samsonov's user avatar
1 vote
0 answers
116 views

Problem to follow links in Samba

To get acquainted with Samba I installed it on a Raspberri Pi and and tried to access shares from Windows (7). Everything works so far, except when I try to get more space by mounting an external ...
JCT's user avatar
  • 11
1 vote
0 answers
70 views

How come rm symlink/ and rmdir simlink/ report symlink/ as both a directory and not a directory?

I have testlink -> testtarget// and rm and rmdir report the following: $ rm testlink/ rm: cannot remove 'testlink/': Is a directory $ rmdir testlink/ rmdir: failed to remove 'testlink/': Not a ...
Paul's user avatar
  • 507