Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

0
votes
0answers
7 views

PTY accessible by group membership inaccessible by symlink?

I'm setting up a Linux application which interfaces with programs designed to talk to a serial port. What's strange is that while I can access the pty by symlink if I am the owner user (klipper), I ...
0
votes
1answer
12 views

Host of issues stemming from too many symlink levels errors

Ok. I understand the title can be misleading or confusing... so plz bear with me. On an AWS EC2 instance, I was upgrading imagemagick. Current installation was 6.8.x which is vulnerable, and I was ...
0
votes
0answers
12 views

Copy symlink not target with GNU `install`

GNU install seems to dereference symlinks. I've read the info page, and am none the wiser on how to get it to copy the symlink rather than its target. Is there any extra magic that install does not ...
4
votes
1answer
446 views

Am I hammering my SSD by keeping a symlink on it?

Instead of configuring my Nextcloud (Linux/Nginx/PGsql/PHP) server to look for a folder on my spinning hard drive mounted at /mnt/HDDfs/, I Sym-Linked /var/Nextcloud_Data so it points to /mnt/HDDfs/...
3
votes
0answers
46 views

find and symbolic link

I was skimming over the documentation of find to better utilize the command usage. I was reading the part that says GNU find will handle symbolic links in one of two ways; firstly, it can ...
0
votes
1answer
70 views

how to use find + xargs to make symlinks to selected files while keeping relative directory tree (uses gnu cp -s)

I'm trying to replicate select files from a directory structure as symlinks in a duplicate directory, eg from a directory structure such as this: ../1/a/data1.txt ../1/a/file1.txt ../1/a/b/file2.txt ...
0
votes
2answers
20 views

How to add link to a device permanently

Using the command: ln -s /dev/ttyUSB0 /dev/gps0 I link the device gps0 to ttyUSB0. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there ...
1
vote
1answer
26 views

Can you create a cycle in the directory structure using symbolic link?

Operating System Concepts says when we add links, the tree structure is destroyed, resulting in a simple graph structure (Figure 11.13). Could you create the cycle book->avi->book using ...
0
votes
0answers
5 views

mate-panel run dialog won't accept symlinks

I have a symlink /usr/local/bin/foo -> /opt/foo/bin/foo, and I use Cinnamon (which uses the mate-panel) on Devuan ASCII (= Debian Stable). Now, if I Alt+F2-run /usr/local/bin/foo - nothing happens;...
1
vote
0answers
26 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/...
0
votes
0answers
23 views

Accessing symlink in docker mount

I have a docker container which mounts letsencrypt /live dir. The certificates in the live dir are actually symlinks to the latest certificates in /archive dir, named in a sequential manner (...
-1
votes
1answer
19 views

Copying a source directory using the command cp -rsf when target directory exists

On Centos 7, when I use the command: cp -rsf /path/of/source /path/of/target When the target directory exists, files would go to /path/of/target/source. How can I avoid that? EDIT: source and ...
0
votes
1answer
28 views

How to list the available soft-link directories in a server linked with NFS mount

We have many directories on a server. These directories were created as soft-link and linked it with some NFS share. I would like to list the soft link directories which linked with NFS shares. we ...
-1
votes
1answer
60 views

How to execute ln on find results

I want to make symlinks for image files in a directory in the server. Currently I'm doing it by executing this command using php function exec(): ln -sf path/to/source path/to/symlink Both file ...
-1
votes
1answer
24 views

Changing symlink path creates additional folder

I tried to change an existing symlink which is accessable under cd ~/symlink_file_name to another folder with the following command: ln -sfn /usr/home/myusername/testfolder symlink_file_name (since ...
0
votes
1answer
20 views

Automator bash script service to create Dropbox symlink

I'm trying to create an Automator service(in the right click menu) that creates a symlink of the folder/file and moves it to the Dropbox folder. This is what I have right now: while [ $# -ne 0 ]; do ...
1
vote
1answer
28 views

creating symlink [closed]

On my support machine, my / filesystem is very small and I frequently get alerts. df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg00-lv_root 7.8G 6.6G 805M 90% / ...
1
vote
1answer
17 views

Relative symlinks not resolving in subdirectory

I've got the following directory layout: /home/me/mydir \- tiller -> ./cache/git-repo1/subdir1/tiller \- makefiles -> ./cache/git-repo2/subdir2/makefiles When I'm in /home/me/mydir if I ...
1
vote
1answer
24 views

perl symlink on gz file

I have a file file1.txt.gz and I am trying to create a symlink to a regular file as below using perl symlink ("file1.txt.gz", orig_file1); But this doesnt seem to work unless I add .gz suffix to the ...
0
votes
0answers
15 views

Is it possible to find symbolic link and file together [duplicate]

As we know, the option -type can indicate the type of file that the command find is looking for. find . -name xxx -type d is to search for the directory, find . -name xxx -type f is to search for the ...
2
votes
1answer
69 views

Overwrite symlink with original file

I have a directory with some symlink file, for example: /home/user/symlink/$(*symlink_file_name1*).mkv /home/user/symlink/$(*symlink_file_name2*).mkv And I have another directory with the original ...
1
vote
0answers
9 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
48 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
20 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
22 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
75 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
129 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
26 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 ...
1
vote
0answers
21 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
35 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
55 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 ...
1
vote
1answer
96 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
57 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
35 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
25 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
27 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
1k 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
41 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 ...
0
votes
1answer
169 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
36 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
773 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
47 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
81 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
7 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
520 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
33 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
71 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
46 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
45 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
407 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 ...