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
0
votes
1answer
38 views

Command run is not the one returned by the command `which` [duplicate]

$ which doxygen /home/gauthier/bin/doxygen $ $(which doxygen) -v 1.8.13 $ doxygen -v 1.8.11 # <- ??? $ doxygen error: Doxyfile not found and no input file specified! Doxygen version 1.8.11 ...
1
vote
0answers
221 views

Nvidia Opengl symlinks

Last NVidia update in the Debian unstable branche (375.82) broke the symlinks of the openGL libs. LIBGL_DEBUG=verbose glxinfo|grep libGL: screen 0 does not appear to be DRI2 capable libGL: ...
0
votes
2answers
168 views

/sbin/mkfs.fs acts like a binary file even though it's a symbolic link file

Considering the output from the ls command: $ ls -l /sbin/mkfs.ext4 lrwxrwxrwx 1 root root 6 Aug 4 00:10 /sbin/mkfs.ext4 -> mke2fs $ type mkfs.ext4 mkfs.ext4 is hashed (/sbin/mkfs.ext4) mkfs....
1
vote
0answers
44 views

Automake distcheck of symlinked sources

I maintain a "master" makefile for a project with many submodules, each of which has its own autotools structure. This project is tested in a number of configurations (e.g. built against different-...
2
votes
1answer
197 views

Why symbolic links have no data blocks allocated to them in ext4fs?

I am a Unix wanderer. I just noticed that symlinks don't have data blocks allocated to them, I think the inode of the symlink file stores the filename which the symlink refers to, is this actually the ...
0
votes
1answer
1k views

rsync copy symbolic links files in root folder without copying symbolic links recursively within the root folders

I am trying to set up a script for copying symbolic links folder data and my idea is to set up a single folder and to create several symlinks in this folder where the rsync will then copy the data ...
2
votes
3answers
213 views

Switch symlink and directory

I have a directory and a symlink to it: mkdir dir ln -s dir dir_symlink I want to replace the symlink with the directory and the directory with the symlink. Is there a way to do that atomically (or ...
1
vote
0answers
181 views

can't run php shell script from symlink [closed]

I'm using Acquia's DevDesktop on Windows 10. For a shell, I'm using babun's zsh. Acquia provides the drush command line interface to Drupal. The command itself seems okay: { drush } » pwd ...
2
votes
2answers
193 views

Why can a softlink to a directory be created with or without the trailing slash?

I have found that when creating a symbolic link to a folder it is produced with or without the trailing slash based on your input. for example: $ ln -sfv /ln-test/FOLDER/ test-tail test-tail -> /...
2
votes
0answers
569 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 ...
6
votes
4answers
860 views

How to create a symlink which opens (literally) the target file

Suppose I have a file bar.txt inside directory foo and create a symlink baz.txt to foo/bar.txt. Like: ./foo ./foo/bar.txt ./baz.txt -> foo/bar.txt If I open baz.txt my editor will think baz.txt ...
0
votes
1answer
380 views

how do i link one directory to another directory so that FTP or SMB share can still use that directory

Needing to link a SMB share directory to a empty directory with a FTP share. There is a empty directory inside of FTP_Share1 called smbshare which I am trying to link to SMB_Share1 to access all of ...
0
votes
1answer
253 views

Symlink to /sys/bus/spi/devices

I'm trying to port a certain software from one linux device to another. My software has a lot of lines pointing to /sys/bus/spi/devices/spi3.0. In the Linux device I'm porting to, that folder does not ...
1
vote
1answer
1k views

Symbolic link to jar file and init.d service

I am following the instructions in the "Installation as an init.d service (System V)" chapter of the Spring Boot Reference Guide. I am not able to create a symbolic link to my Java app in init.d on ...
0
votes
1answer
206 views

Symlinking /mnt in a VM to compile file directly to VM folder

What I'm trying to do is symlinking a shared folder between my Mac and my Ubuntu VM. The shared folders on the VM are going in /mnt/hgfs/. On my Mac I symlink the directory (let's say macdirectory) ...
5
votes
2answers
4k views

OpenSSH refused .ssh directory with a symbolic link

In my environment, actual .ssh directory exists on external device and links from it to ~/.ssh with a symbolic link. Using openssh as client is working without problem, but sshd does not allow to ...
3
votes
2answers
1k views

Find disk usage of folders with symlinks

I am working on a Debian server where I have only console access without sudo. The main folder called applications includes subfolders with all the projects I have. However, when I create a new ...
1
vote
2answers
460 views

Archiving user home folder to remote server, without following symlinks?

We need to do a once-only archive copying of users' home folders to an archive server (pending final deletion) when they leave, in case they later discover that they may still require some of their ...
2
votes
1answer
42 views

How to link to original dir by linking a link to that dir?

Here is the sample $ mkdir original_dir $ ln -s original_dir link $ ls -l original_dir link -> original_dir Now I want to create a new link to original_dir by linking to link, how can I do that $...
3
votes
5answers
1k views

Link 2 existing files

I have 2 existing files : abcd and xyz. $ cat abcd abcd $ cat xyz xyz Now, when I try to softlink these files, I get this message : ln: cannot create xyz: File exists I do not want to use ln -sf ...
0
votes
2answers
29 views

Make a link to the file so that enviroment can find it

I am installing a program following instructions What you need for a manual installation is the subdirectory MaTiSSe-vx.x.x under the release directory (chose the version x.x.x you want). Just copy ...
0
votes
3answers
759 views

How to find which command is executed by a symlink? [closed]

Somewhere in my system (the problem is I don't know where) I have a symlink to which is given priority by bash but the link is broken and therefore it doesn't work. More specifically: current ...
2
votes
1answer
807 views

purpose of symbolic links when mounting via fstab

Considering the following instructions I found online for how to auto-mount a directory at startup: Make the symlink: sudo ln -s `which gdfs` /sbin/mount.gdfs Add the entry to /etc/fstab: /...
3
votes
1answer
4k views

Enable systemd services without systemctl

I need to enable systemd services before I'm actually booting the system (for unattended install purposes). Therefore I can't use systemctl. I could use systemd-nspawn, but I think it not that well ...
4
votes
1answer
3k views

How to list the symbolic links with sftp?

Our hosting provider does not allow ssh-access (because security), but lets us upload files and manipulate directories via sftp. (The only other choice is through "cpanel"). sftp is good enough to ...
1
vote
3answers
7k views

In my CentOS 7.2 the symbolic link is not the whole directory

This is the tutorial shows: You can see the /application/nginx -> /application/nginx-1.8.0 But I follow the steps: [root@localhost nginx-1.8.0]# ll /application/nginx lrwxrwxrwx. 1 root root 12 ...
1
vote
1answer
72 views

symlink not is recursive

ln -s /home/marcelo/MEGASync/localhost /var/www/html/ I am using symlink from terminal ubuntu to get all sites from my /home/marcelo/MEGASync/localhost/ to my www of my apache. I Access localhost ...
2
votes
1answer
52 views

Finding file by name recursively, deleting it and creating a symlink

Given: Folder structure as (file.txt are plain text files in each directory, not symlinks): /basedir/A/file.txt /basedir/B/file.txt /basedir/C/file.txt The same file.txt that sits in /mydir: /...
0
votes
3answers
229 views

Symbolic link picking up wrong directory

Can anyone explain why this script is trying to create the wrong symbolic link? The main issue is with the line: ln -s ${src}/${lib} ${dest64}/${lib} as it's throwing the following error: ln: ...
17
votes
1answer
2k views

ls -l vs ls -lL

I know this looks like a duplicate, but previously asked questions do not answer my question so in the shell I go to /home directory and create a directory there calling it play then I go to this ...
0
votes
1answer
32 views

Why soft links from standard folders?

My observation is, most of the python files sitting in some standard locations like site-packages are symbolic links to actual file name(sitting in non-standard folder) pointing to inode. ...
4
votes
1answer
655 views

python symbolic links (also to itself) in usr/bin

I am currently playing around with cmake a bit and in the process I discovered a few things I don't understand mostly concerning python symbolic links in usr/bin directory: In my usr/bin directory ...
1
vote
1answer
121 views

Link directories in CentOS

I am on a CentOS server and I have a user called theowner, so he has his folder under /home/theowner. I have two other folders, f1 and f2, under /home/myprojects/src, and I want that these folders ...
2
votes
2answers
97 views

What is the benefit of a logical working directory?

I understand what a logical working directory is. When you create a symbolic link to a directory, and then cd to that directory using the symbolic link, your logical working directory becomes the path ...
1
vote
2answers
150 views

Is there any way to create soft link using relative pathname? (not relative to home, or absolute)

I tried using relative to pwd, but it doesn't work. My current pwd is different from target path and original path (from where link need to be created). I do not know the home directory so I ...
1
vote
1answer
727 views

`find -type l` matches file while `-type l -o -type f` does not, but only with explicit `-print` [duplicate]

I'm using GNU's find. I've simplified my problem to this shell session: $ mkdir t $ cd t $ touch a $ ln -s a b $ find -type l ./b $ find -type l -o -type f ./a ./b $ find -type l -print ./b $ find -...
8
votes
1answer
5k views

Can I create a symbolic link to a file I can't access?

[Disclaimer: there's no malicious intent to this question, I'm trying to understand the ln -s command for a school project] Say I have a file system with my home folder, /home/anna. /home/bob is a ...
0
votes
1answer
95 views

Symlink with seperate permissions on either side

How can I create a symlink that works kinda like this: There is a symlink in /home/user/ called "www" I want to make it so, "user" can go into the symlink, and everything be owned by "user" but in ...
2
votes
1answer
119 views

How do I delete symlinks that's pointing to files in a certain folder?

I think this is best explain with an example: lrwxrwxrwx 1 root root 21 Mar 31 08:44 awk -> /etc/alternatives/awk* -rwxr-xr-x 1 root root 45K Apr 8 2015 b43-fwcutter* lrwxrwxrwx 1 ...
15
votes
2answers
4k views

What idempotent command can I use to make a symlink pointing to a directory?

I want to put a command into a shell script which will create a symlink to directory, but this script could be run over and over, so on subsequent invocations, the command should not change anything. ...
1
vote
1answer
927 views

Nginx symlinks not indexing [closed]

I'm running nginx 1.10.0 on Ubuntu 16.04 Nginx dos not follow symlinks. it even not list the symlink in directory index: as you see in the image wgi is a symlink and it doesn't list in directory ...
8
votes
1answer
377 views

permissions of symlinks inside /tmp

I have 2 users in my machine: linuxlite and otheruser. otheruser has a file: otheruser@linuxlite:~$ ls -l a -rw-rw-r-- 1 otheruser otheruser 6 Mar 31 12:47 a otheruser@linuxlite:~$ cat a hello ...
0
votes
1answer
87 views

Find all softlink files which link to a specific directory use pure find command

I have 2 link directories in ~, ~/PathA (a git directory) and ~/PathB. The ~/PathA is a subdirectory of ~/PathB. Those two are linked to other physical disk. I linked a lot of files to file under ~/...
6
votes
1answer
153 views

Looking for tested utility to get the absolute path to a relative symlink target

NB: In the original title of this post, I used the word standard in the everyday sense of "well-established" (and therefore time-tested, as a contrast to quick solutions I could roll myself). In the ...
6
votes
1answer
277 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 ...
7
votes
1answer
97 views

What workaround should be used to overcome issue with systemctl refusing to enable unit files that are symlinks?

I have a package that will be updated soon but I know that some of the users will prefer using the old one. That's why I used an update-alternatives routine in the package. The problem is also that ...
0
votes
1answer
414 views

symbolic link to ~/SomeDir relative to user home [duplicate]

I have some project, which I share with other people. It is stored and distributed in git. It should contain links to directories outside the git archive, but inside th user home, where some common ...
3
votes
0answers
88 views

How to approach planning a BSD file server's outward-facing file hierarchy

I'm migrating data on an informal home server to a new FreeNAS (FreeBSD 10) based file server running samba, and I'm stuck in trying to plan how to lay the data out, to give correct access to ...
1
vote
1answer
140 views

How to create a POSIX-compliant relative symbolic link in /bin/sh?

The idea is to have the environment configured like this: mkdir ~/shortcuts cd shortcuts ln -s ../.. up2 As a result I want to be able to go 2 directories up the file tree whenever I call: ~/dev/...
5
votes
2answers
2k views

Size of symlink

Symbolic links do take room, of course, but just the room it takes to store the name and target plus a few bytes for other metadata Do symbolic links actually make a difference in disk usage? My ...