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
1
vote
0answers
9 views

Symlink to file in /proc [duplicate]

I was looking at some different files in /proc, and observed some strange behavior. So, first of all, we know that symlinks [point to names, not files][1]. And when creating a symlink, I can both ...
0
votes
0answers
21 views

Symlinking to / [duplicate]

I'm working on a little project that makes installing from source easier and one of those parts is getting the project to compile to a certain directory /usr/src/pkgname, so that all the files in ...
0
votes
1answer
15 views

Double symlink of vim doesnt load library file ncurses.so.6 when invoked with sudo

I have a symlink of the vim.basic executable: ⤷ ls -l /etc/alternatives/vim lrwxrwxrwx 1 root root 18 Apr 22 21:02 /etc/alternatives/vim -> /usr/bin/vim.basic Another symlink to the above symlink ...
0
votes
0answers
19 views

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

My project structure is : $ tree . -L 2 . ├── venv │ ├── bin │ ├── include │ ├── lib │ ├── lib64 -> lib │ ├── pip-selfcheck.json │ └── pyvenv.cfg ├── py -> /path/to/project/venv/bin/...
0
votes
1answer
19 views

Can I use locate's functionality to find symlinks faster?

I've just read: How to find all symbolic links pointing to any file/directory inside a given directory but that is pretty slow. Now, on typical Linux systems, a filesystem database-of-sorts is ...
0
votes
1answer
56 views

Linking a dropbox business acccount from “~/Dropbox (firm-name)” to “~/Dropbox”, with “mount --bind” or symlink or something else?

Been using my Dropbox account for years on a Lubuntu system. Now, my new company has made a Business account available to me. However, Dropbox insists that this folder should be called: ~/Dropbox (...
0
votes
2answers
43 views

How to copy target files using symlinks and a list of file names

I would like to copy many files. I have their location as a set of symbolic links whose names are stored as lines in a txt file. So I am using cp and need to combine the readlink and cat/pipe ...
0
votes
2answers
50 views

Creating symbolic link in the same directory

Having some trouble with creating links. I want to create the following: ls -la /usr/pkgs/python3/ total 44 drwxr-xr-x 5 root root 4096 Sep 3 2020 . drwxrwxr-x 259 root root 20480 Feb 16 06:49 .. ...
0
votes
1answer
35 views

What is deleting my symlink to my USB luks partition upon cryptsetup luksOpen?

I wrote a new udev rule to create a symlink to a luks-encrypted partition on a USB flash drive when the drive is plugged in. The new udev rule I wrote does create the symlink to the USB drive's ...
0
votes
2answers
44 views

Can symlinks be used to point to a remote file that may not be available

I'm looking for a smart way to manage a pi I use for downloading with omv5, dockstarter, docker, etc... My pi can be on all the time, but the larger server I'd like a schedule, so the pi will use wol ...
0
votes
0answers
17 views

Symbolic link renaming backup files

I'm using backup files for when I create new symbolic link for files/folder. Because it's renaming existing symbolic files automatically on target folder like this : Let's say /home/main/Desktop is ...
1
vote
0answers
12 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 ...
1
vote
2answers
63 views

How to tell a program it's in a symlink folder?

If I have a symlink folder like: /home/user/foo/foo2 -> /home/user/bar/bar2 I cd to: /home/user/foo/foo2. If I do a pwd, it returns: /home/user/foo/foo2. Great! But if I then ls ../ it will return ...
10
votes
1answer
858 views

Why does catting a symlinked file and redirecting the output to the original file make the latter file empty?

Here's how to reproduce it: echo 'the original file' > orig ln -s orig symb # now symb is symlinked to orig cat symb > orig # this makes orig an EMPTY FILE, but why? orig becomes an empty file ...
0
votes
2answers
26 views

What is the effect of a symlink in a buildah mount?

If I run a buildah script like this, ctr=$(buildah from alpine:3) mnt=$(buildah mount "$ctr") ln -sf "$PWD/foo" "$mnt/foo" buildah commit $ctr "myimage" Will ...
2
votes
1answer
70 views

Symlinks point to the same executable target, but do different things [duplicate]

I have vim-athena package (the same is observed for vim-gtk) in my Debian machine. Running vim spawns Vim in the terminal. Running gvim spawns a new window with Vim in a Athena GUI. But what is vim ...
0
votes
0answers
17 views

Backup and restore links to config files and directories

Like many (I think), I have a ~/document directory which I would like to backup periodically to an external drive. ~/document contains also some symlinks to config files and directories, such as ~/....
2
votes
0answers
44 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 ...
0
votes
0answers
18 views

Building softlink inside a file in Linux : Not a directory

I am running the script tedlium/s5/run.sh of Kaldi repository https://github.com/kaldi-asr/kaldi/tree/master/egs, and encountered the following error : run.sh: line 30: utils/parse_options.sh: Not a ...
4
votes
1answer
64 views

How do I ignore warnings, but keep error messages from 'find'

I'm trying to run a find command, and due to the way the folder is set up, I keep getting the following warnings several times in my script: find -L ./server/ -type f -printf '%s %p\n' | <rest of ...
0
votes
1answer
31 views

Help with script swapping target and symbolic links

I'm trying to create a script to swap the location of a symbolic link in the current directory and the target file in another (relative) directory. Unfortunately, I can't figure out how to make the ...
0
votes
0answers
7 views

How to mount several partitions with symlinks on different architecture?

I have RasPi image with 3 partitions. On RasPi they are mounted on /, boot/ and mydirectory/. I can mount them on x86 with mount and losetup. Unfortunately, symlinks appear dead, because paths are ...
0
votes
1answer
117 views

Rsync fails to create symlinks when syncing with an ExFAT partition

I tried to sync with an ExFAT partion on an external HDD using the command: rsync -avvP --remove-source-files /path/to/sourceDir /path/to/destDir However I got this type of error several times: rsync:...
0
votes
0answers
18 views

Xorg not seeing environment variable and not following the symlinks to the configuration file

I am trying to use symlinks so I can have a xorg.conf (Trying to put it in ~/.config/xorg) file in my ~/ directory and have Xorg read it. I made a directory in ~/dotfiles called xorg, and I put 30-...
0
votes
0answers
19 views

How to prohibit thumbnails from digiKam to automatically get removed in git-annex-repositories?

git-annex is a great way to keep big stuff under (distributed) version control. I'd also like to do that with my images. Currently I'm using digiKam as my photo management tool. By itself this works ...
0
votes
1answer
61 views

Virtualbox shared folders with symlinks

I want to configure 1 shared folder /home/host/shared and put symlinks to other shared items in that shared directory to make them accessible by the guest machine like /home/host/shared/d1 --> /...
0
votes
1answer
19 views

Ran a for loop to create several symlinks at once, two of them failed and I don't see why

So I have a digital copy of this anime series whose filenames are in Japanese. The original files need to keep the same name, but I needed the names in a different format so I decided to symlink them. ...
0
votes
1answer
25 views

Linking to files online

Is is possible to soft-link to a file on a web server? For example, if I have files hosted on localhost, is there a way to make ln -s http://localhost/file.txt ~/myremotefile.txt work as possible? I ...
1
vote
2answers
50 views

What is the most effecient way to start this application?

I installed BurpSuiteCommunity and the executable went to /opt folder, so I moved it to /usr/bin because /usr/bin is part of my PATH and most of applications were already there. I tried to do run ...
4
votes
1answer
58 views

zsh/bash: Expand relative paths in command arguments using logical directory structure rules before execution

So I know that pwd and cd in the shell have a "logical" and "physical" mode (see this SO question and questions linked from there). Now, assume I have this symlink: /home/<...
1
vote
1answer
61 views

Is there a standard Linux utility to generate shared library symlinks?

In an embedded environment that I'm working in, the following files are present: lrwxrwxrwx 1 root root 19 Aug 23 2016 /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1 -> libjsoncpp.so.1.7.4 -rw-r--r-...
5
votes
2answers
212 views

readlink -f and -e option description not clear

-f, --canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist -e, --canonicalize-existing canonicalize by following ...
0
votes
0answers
14 views

How to create and 'register' new files inside symlink folder

I created symlink folder and I want to create some new files inside, the problem is they are not 'propagated'/'registered' inside the real folder, if you know what I mean. I need to go to the original ...
0
votes
1answer
68 views

Bash script for monitoring a directory and symlinking all newly created subdirectories and their files

I am in need of a bash script to recursively watch a folder and symlink every new file and subdirectory to another folder. this script correctly symlinks subdirectories and their contents: #!/bin/...
1
vote
1answer
71 views

Creating Symbolic link in SMB share

I am connecting to an SMB share, i have read and write permission. I am trying to create a sym link to a file outside the share, but i get the following error: ln: failed to create symbolic link '9' : ...
1
vote
0answers
13 views

How to extend an external storage device to a chrooted directory?

I run game servers that can generate a lot of data. So I purchased a couple of 12TB drives to store all the data. I've looked into how to link the storage of the drives to a location within a chrooted ...
0
votes
0answers
49 views

Linux redirecting a directory to some other directory only for a specific application

I have run a program that accesses some files from the directory /etc/somedir. What I want to do is whenever it tries to access /etc/somedir/somefile it automatically redirects to /home/arch/...
0
votes
1answer
60 views

How to set X11 conf file as symlink?

Xorg doesn't interpret configuration file from neither /etc/X11/xorg.conf.d/* nor /usr/share/X11/xorg.conf.d/* if said file is a symbolic link. I would like to keep my custom configuration files for ...
1
vote
0answers
23 views

Is it possible to directly access files out of a symlink-directory? [duplicate]

Say I have this directory structure: foo │ ╲ bar baz │ ╲ wun ← wunl │ blarg Here, wunl is a symlink pointing to ../bar/wun. Now I can $ cd foo/baz/wunl/blarg At this point, I'm not “actually” ...
0
votes
2answers
64 views

Symlink Source Target confusion

Every time I try to setup a symbolic link (symlink) I stuggle to get my head around symlink source and target. I have tried this a few ways and it continues to fail. Let me explain. BackupPC v4.4.0 ...
0
votes
1answer
576 views

python3 binary in /usr/local/bin but also…not?

I don't understand what's happening here. I'm on Mac. When I run /usr/local/bin/python3 or /usr/local/bin/python3.8, I get a No such file or directory error. Any ideas what could be going on here? ...
1
vote
2answers
82 views

How to: Find The Name of a Symbolic Link

I made a symbolic link with ln -s /home/orca/www/* /var/ and now I need to delete it. I needed to move all my webfiles which were in /var/www to /home because my / was full. Here is what I did. I ...
0
votes
1answer
59 views

How to find the original file through multiple symlinks? [duplicate]

I've run into situations where symlinks point to other symlinks causing me to have to run multiple ls commands to try to trace where the base file is stored. For example if I want to know the ...
0
votes
2answers
46 views

Symbolic Link command behavior ln -s

If I issue ln -s source.txt symlink.txt and symlink.txt does not already exist, is a link file automatically created called symlink.txt or is the command a noop? If it is a noop, if I just create a ...
1
vote
1answer
17 views

How can I detect when the directory I think I'm in links to a different actual directory?

If I am sshed into my Rails server, and I am in /var/www/some_app/current, it's actually a symlink pointing to (say) /var/www/some_app/releases/20201015004444. If I do a deployment, then current is ...
2
votes
1answer
86 views

Running a bash script from a symbolic link. How to change dir so relative directories work

About the situation: I have a symbolic link named mycommand within $PATH. It links to a file called mycommand.sh elsewhere. That file needs another file, lets call it mycommand2.sh: somedir |-...
0
votes
1answer
29 views

How to correct a link… Or is it a GNOME Desktop menu entry?

Few days ago, I've downloaded IntelliJ in my Downloads folder. I've executed bin/idea.sh installed it, and a convenient icon became available in my GNOME Desktop named IntelliJ, and was shown whenever ...
0
votes
2answers
100 views

How to list attributes (esp. date) of a symbolic link's target file?

When typing ls -la we get the list of files in the current directory, with symlinks having also their target files printed. When displaying a symlink, the shell prints the attributes (and particularly,...
0
votes
1answer
89 views

Symlinked gitconfig resolves include relative to symlink

I added a gitconfig to my dotfiles. To keep things tidy, a symlink at ~/.gitconfig points to the real file, which lives elsewhere. I want to have a section like: [include] path = other-file.txt ...
0
votes
0answers
20 views

How do programs accessing symbolic links differ from users? (What scenarios can break by replacing a file with a symbolic link?)

I think I understand what soft and hard symbolic links are, but I'm not sure how programs access them (as opposed to me, a user). For example, I want to replace my ~/.bashrc with a symbolic link that ...

1
2 3 4 5
20