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
16 views

Thunderbird not willing to start firefox when binary replaced with symlink

I've been using the Debian "alternatives" mechanism to support multiple installed versions of Firefox. Regardless of the specifics, the bottom line is that instead of /usr/bin/firefox being a binary, ...
0
votes
0answers
377 views

Symbolic link to python 3.6 is ignored

How can the following be? dims@pterosaur:~$ ls -l /usr/local/bin/python3 lrwxrwxrwx 1 root root 18 Aug 15 12:18 /usr/local/bin/python3 -> /usr/bin/python3.6 dims@pterosaur:~$ which python3.6 /usr/...
0
votes
0answers
150 views

Disable commands in Alpine Linux

I want to attempt to increase the security of some Alpine Linux Docker containers which run Nginx and other servers. I would like to disable commands like ls, cat, ed or sed, so that they are ...
2
votes
1answer
164 views

Where do I find the allowed maximum number of symlink dereferences? [duplicate]

In the book The Linux Programming Interface, it says The kernel imposes limits on the number of dereferences to handle the possibility of circular chains of symbolic links. Where can I find ...
1
vote
3answers
90 views

I need to find only directories in the directory but exclude a linked directory and its link

I am in a root directory and have some folders inside: 0.1 0.2 0.3 0.4 0.5 0.6 shortcut -> 0.6 I need to list the above directories without both shortcut as well as 0.6 folder. I don't won't to ...
1
vote
3answers
2k views

Linux 'cp' copies symlink instead of target file

In my directory I have 2 files: a text file and a symbolic link to that text file. base_v21.txt -> base_v001.txt base_v001.txt When I try to copy base_v001.txt using the following command: # cp ...
0
votes
1answer
27 views

symblic link across a mounted fs

I have access to a disk that has been mounted across servers such that the directory storage2:/sdb1/users is visible from my server at local1:/mnt/storage2/users. There's a big file I'd like access ...
3
votes
0answers
314 views

Why does conda not use symlinks for duplicate dependencies? [closed]

I wondered whether conda actually made duplicate files for certain dependencies shared by independent environments. I installed two environments env1 and env2. Then I installed the same module ...
1
vote
1answer
68 views

How to create a custom command or shortcut/symlink to run the standalone program?

Friends I have downloaded tor bundle which is a standalone package. I'd like to create a custom command "torbrowser". I followed these steps, --> I copied entire tor bundle to my /usr/local directory ...
0
votes
2answers
300 views

How can I trick Plex Media Server into writing logs to a black hole?

The quick version: I want to point my '/volume1/Plex/Library/Application Support/Plex Media Server/Logs/' directory to a black hole, so nothing gets written to it. Is there a way to do this? Will it ...
2
votes
1answer
580 views

How do hard links, symbolic links, and ACL folder permissions interact?

This one was a bit tricky for me to realize, but I came across a very weird behavior involving ACL extended file permissions and hard/symbolic links. I'll do my best to keep my question short and to ...
1
vote
1answer
154 views

Move directory structure and preserve symlinks [duplicate]

I'm trying to work around a makefile issue where libraries are installed in the wrong place. Someone else wrote the makefile and it is not easy to fix. I'm trying to move the libraries after they have ...
0
votes
3answers
39 views

Is working in symlink directory identical to working in the directory directly? [duplicate]

In my home directory, I have a folder named symlinks in which all my symlinks live. I've added this folder to my CDPATH, so that I can do: ~$ cd FarAwayDirectory ~/symlinks/FarAwayDirectory$ I’ve ...
0
votes
1answer
41 views

Replacing a symbolic link after replacing target

If I have a symbolic link to a target file and I replace the target file's data, keeping the same target name, do I have to delete the symbolic link and create it again ?
0
votes
0answers
119 views

How to execute a cgi pointed to by a symlink?

My website has several cgi's (executable binaries compiled from C source, in case that matters) that work fine when run from a browser as, e.g.,       http://mydomain.com/cgi-bin/...
0
votes
1answer
8k views

“No such file or directory” error on existing file?

I have an issue with a binary(?) that simultaneously seems to exist and not exist. $ ls -l /usr/local/bin/vue lrwxr-xr-x 1 myusername admin 73 Jul 14 15:31 /usr/local/bin/vue -> ../../../Users/...
0
votes
1answer
67 views

Link hidden directories

I would like to completely link /root/.vidoes/ to the new directory /home/videos/ If a script tries to read/update/save a file to /root/.vidoes/ for example /root/.vidoes/newvideo.mp4 then it should ...
1
vote
1answer
1k views

How to get the filename of a symlink destination in a shell script?

let's say the scriptname is myscript. It's a symbolic link to thescript_1.91.sh Is there a way to get the name of the link destination? An example: I want to write in a logfile cat <<EOF ####...
1
vote
1answer
48 views

To Symlink or not to Symlink?

Prefacing this by saying I'm pretty new to Linux/Computers. I'm working on doing a yum update on an outdated RHEL (7.2) system. I'm currently not able to install anything new or change the disk ...
0
votes
2answers
3k views

mkdir -p if final target is symlink

Say we have: node_modules/ suman/ and node_modules/suman is a symlink if we do: mkdir -p "$PWD/node_modules/suman" I assume mkdir -p will not overrwrite the symlink? what about if $PWD/...
-1
votes
1answer
140 views

Why do relative paths that traverse a symlink in reverse resolve using the true path?

Either I've completely misunderstood something about symlinks (most likely), or their behaviour has changed at some point and I'm now catching up. I have a script directory that resides somewhere on ...
1
vote
1answer
445 views

Allow patch of symlinks

When I try to run a patch command with a patchfile against a link, patch gives me the error: File path/to/file is not a regular file -- refusing to patch The following command produces this error ...
0
votes
1answer
12 views

File popups freeze in specific directory and show nothing - how to fix?

I had this issue for months. Whenever I moved to my home directory within a file popup (from both qt and gtk), the window freezed and I could neither close it nor move to another directory. I just had ...
1
vote
1answer
2k views

Symbolic link not working on nginx [closed]

Nginx is working fine with root path without symbolic links(Eg.../1.0/public). When a symbolic link is used(Eg.../current/public where current is a link to 2.0) the changes don't get affected until I ...
0
votes
0answers
55 views

Binary representation of Symbolic Link

I am working on a ctf and I want to upload a Symbolic Link that points to a file instead of uploading a regular file. I want to know if there is there a way to build a symlink by hand or to copy the ...
1
vote
2answers
207 views

rsync with symlink on path [closed]

Say we have a path on our directory like: a/b/c/d/e where c is actually a symlink, a/b/c -> f And f contains d/e. Then when I run rsync -avzR, without the --copy-unsafe-links flag, it will ...
2
votes
1answer
59 views

Symlink some file of a tree to another folder and conserve folder structure

Assuming this tree (top-X & tX-sub-X are folders, and all sub-folder containing a .csv and various other file extensions.) Base ├── top-1 │ ├── t1_sub-1 │ ├── t1_sub-2 │ └── t1_sub-3 │ └─...
3
votes
2answers
59 views

Difference between rm my-symlink and rm my-symlink/

Just wanted to know why if I use rm -rf my-symlink it deletes the symbolic link only but rm -rf my-symlink/ deletes the files within the linked directory and leaves the symbolic link alone?
2
votes
1answer
3k views

How to create a symbolic link from one user directory to anothers?

I have 3 users: admin with sudo, and two normal users - user1 and user2. user2 is under user1 group. There is a folder fold1 as /home/user1/fold1 which is under the group user1 with read and write ...
1
vote
1answer
392 views

rsync --update with symlinks

This is related to this question but I don't think the answer exactly applies here. I have two servers that sync directories between each other. These directories contain files and symlinks. On ...
2
votes
2answers
2k views

`ls` Attemptes to list nonexisting symbolic links on WSL

I have clean installed windows 10 (build 1803). I have installed Ubuntu from the Microsoft Store and enabled Linux subsystem. I have done this several times in the past, and never have I had the ...
3
votes
1answer
254 views

How to teach AppArmor about toplevel symlinks

I have my "root" partition split into two: a normal one that contains most files and a second one used for those areas that can "grow". Concretely, this means, I have symlinks like: /var/log -> ...
0
votes
1answer
56 views

Can rsync copy directories over links

I have the following scenario where I need to copy directories which sometimes can be links and sometimes a directory with the same name. For instance, suppose this is the initial setup: Source: /...
0
votes
1answer
93 views

A command's output and its symbolic link's output do not match

I am using RASPBIAN on my raspberry pi. I find out that the command "apropos" is a symbolic link of the command "wahtis". However, the output of those commands do not match when used with the same ...
0
votes
2answers
481 views

What is the meaning of 'ln -sT' in Linux?

To be more precise: I know what the -s options stands for - I use it daily. But I saw someone in a tutorial, who was moving the document root of his website from /var/www/html/project to ~/www/project ...
0
votes
0answers
38 views

Find with '-type d' not working if the path contains symlinks?

I have a directory structure something like this (I've simplified it for this question): /dirX /dirX/d/d1 [and contained files+subdirs] /dirX/d/d1/d2 [and contained files+subdirs] /dirX/d/d1/d3 ...
2
votes
2answers
1k views

Cannot start Springboot as init.d service on port 80

I've been following the official guide to setting up Springboot as an init.d service on an Amazon Linux ec2 instance. Before I got to this setup, I was running into the problem where I could not start ...
0
votes
4answers
203 views

Count number of files that are not symbolic links in output from “locate”

I'm trying to count the number of non-symbolic linked files passed by the locate command. I've tried a number of options and think this is the most promising: locate -r "$PWD.*\.c$" | xargs -0 -I{} ...
0
votes
1answer
220 views

Why does `rm` claim my symlink is a directory? [duplicate]

I made a symlink to a directory like this: ln -s /some/directory symlink Now I'd like to remove the symlink: rm symlink/ This doesn't work. The error message is: rm: cannot remove 'symlink/': Is ...
1
vote
1answer
68 views

Question related to symbolic links and copying

So the following command copies from /source/allsubdirectroies (/usr/hdp/2.6.3.0-235) to a /target (/tmp/jar263) folder: find /usr/hdp/2.6.3.0-235 -type f -name "*.jar" -exec cp {} /tmp/jar263 \; ...
0
votes
3answers
65 views

Create symbolic links for multiple books collected from command `find`

I'd like to create symbolic links for multiple books searched from running find command. Firstly, I collect all the JS books find ~ -type f -iregex '.*javascript.*\.pdf' > js_books.md 2>/dev/...
1
vote
1answer
238 views

Create hard link if possible, else use symlink

I am trying to write a shell script to create link for file from my dotfiles repo to my home folder. I want to use hard link if possible because it cannot be broken when moving it to somewhere in ...
1
vote
1answer
98 views

Why can't a project compile with symbol link

I'm working in a team, which develops a c++ (ROS) project. For some reason, we haven't a good git management. We have several git branches. To compile the project, I have to git clone the codes from ...
0
votes
2answers
289 views

Apply readlink to a non-symlink file?

The following code from https://stackoverflow.com/a/920834/156458is to get the pathname to the parent directory of a script inside the script, even if the script is run via a symlink to it: if [ -L ...
1
vote
1answer
3k 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 ...
0
votes
0answers
49 views

Can't delete a symlink from /usr/lib [duplicate]

I'm on Fedora 27. I want to delete a symlink from /usr/lib, but can't because of Operation not permitted. I'm under root and here are commands and the output: [root@thinkpad lib]# ls -al cpp ...
0
votes
1answer
52 views

Is there a tool to auto delete all invalid symbolic links?

I have a Fedora workstation, when upgrade the system some software for example LibreOffice do not delete its old symbol link in /usr/bin and when I update other software, there are a lot of warnings ...
1
vote
1answer
138 views

Inconsistent behavior of Bash's `cd` with symbolic links [duplicate]

I am currently trying understand the behavior of Bash's cd when it comes to symbolic links. By default, cd should follow the logical directory structure and should not resolve symbolic links. cd ...
1
vote
1answer
184 views

Why does udev concatenate two symlinks?

My distribution is SLES 12 SP 2. I work with DRBD (distributed replicated block device) right now. Here is an example of a configuration for a drbd resource. resource HA1dat { device /dev/drbd1; ...
1
vote
2answers
436 views

Can't delete and remove SELinux context or ACL from a symlink in /usr/lib under root

I'm on Fedora 27 and experience problems with updating the packages by dnf update. The problem is exactly as described here: https://superuser.com/q/1005740/683161 I tried to delete symlink under /...