Stack Exchange Network

Stack Exchange network consists of 175 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 is used to modify the pathname resolution.

0
votes
1answer
34 views

Why are Linux namespace links in /proc red in color?

I inspected the symlinks in an Ubuntu VM for the namespace related directories under /proc/PID/ns. I see all the links are in red color. I even tried to test using unshare to see if I can create a ...
1
vote
1answer
39 views

unlink/rm target of an open symlink

I've come across an issue where processes that load symlinked .so files crash if I update the .so while the processes are still running. I have long-running processes that load shared libraries (.so)...
0
votes
1answer
18 views

Debian - Restore a Timezone File [duplicate]

So, I just screwed up a timezone file on my Debian system because I pointed it as a link to /etc/localtime vs. pointing /etc/localtime to it. Specifically, /usr/share/zoneinfo/America/Puerto_Rico. I'...
0
votes
1answer
13 views

Symbolic Link Restores Original File

On Linux, I created a file (file1): echo Hello file1 > file1 Then, I created a symbolic link (file2), to file1: ln -s file1 file2 After that, I removed file1: rm file1 Lastly, I edited file2 ...
2
votes
3answers
110 views

How to create a folder symlink that has a different name?

I want to create a symlink ~/.pm2/logs -> /opt/myapp/log When I run ln -sFf /opt/myapp/log ~/.pm2/logs I get a symlink ~/.pm2/logs/log -> /opt/myapp/log which is not what I want. I'd ...
0
votes
2answers
58 views

Is it possible to “add” a second folder to the current folder file contents? symlink?

question: Is it possible to "add" the contents of a 2nd folder to the current folder file contents? (In essence I was asking from a full Unix is perspective but may be nginx would work too as the goal ...
1
vote
1answer
21 views

Python symbolic links mixed up

Using Ubuntu 16.04 Tried to set python 3.6 as default for the python3 command. I found what seemed to be the answer and quickly copy-pasted the following lines without carefully reading: $ sudo ...
1
vote
1answer
63 views

Create symlink to a directory I don't have permissions over

Bit of history first: where I work, some developers/shareholders have brought their intellectual property together to form the company. IP still remains theirs alone, individually, as well as the ...
0
votes
1answer
25 views

I want to make symlinks of all files in a directory EXCEPT the existing symlinks in the directory

I have a bash script that creates symlinks from the directories in one users directory to another users directory. I want the script to exclude existing symlinks in the source directory when creating ...
0
votes
2answers
63 views

rm -rf ~/Desktop - how to fix it and/or change the location

I was trying to symlink Windows desktop with Lubuntu desktop folder, but have in the process removed the Lubuntu folder completely. I know I can't recover the lost files, but how do I fix this now, ...
0
votes
0answers
44 views

Find file and directory size while ignoring symlink in sub-directories

I have a directory structure where there are multiple symlinks at random depths. For illustration purpose: /fs /fs/afile /fs/blink -> /usr/local/lib /fs/cdir/cfile /fs/cdir/cdir/cdir/clink -> ...
3
votes
1answer
44 views

Permission denied when cd to symlink'd dir in /tmp that is 700 and owned by regular user

Question: Why am I not able to cd into a symlinked directory with 700 permissions, owned by a regular user, as root, when I am able to change into the directory itself? Example: ttucker@plato:/tmp# ...
0
votes
3answers
40 views

Error to Create symbolic binary link

I want to create a symbolic link for vi to see this program when calling from console run vim: ln -s /usr/bin/vi /usr/bin/vim` ln: failure to create symbolic link «/ usr / bin / vim»: The file ...
1
vote
1answer
41 views

Rsync not correctly copying Symlinks

I have an rsync to copy over some rpms from one server to another but the issue is that the symlinks are not being created properly on the receiving server. My rsync options are -avz --force --delete ...
0
votes
1answer
127 views

zip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target

I have some weird warnings when zipping a directory's content. I use a command line I use for a ton of websites backup since years and never had such issue, and I try to figure out why I have the ...
3
votes
1answer
77 views

Some special files in Unix

Background There are lots types of special files in Unix, for example symlinks, device files and proc files (under /proc). /proc files are just normal files or even text files. But for the rest, I ...
1
vote
3answers
111 views

Protecting Linux systems from symlink attacks

Linux-based systems are vulnerable to symlink race attacks from unprivileged UID processes. For example, a PHP process on a shared hosting can create a symlink to /etc/passwd in a directory where ...
1
vote
1answer
44 views

/bin/sh symbolic link not working properly

I am using i3, and by default, it uses sh when starting process with the i3 config exec command. This is fine and dandy, but that means the environmental variables created in my .zshrc do not get ...
0
votes
0answers
9 views

How to install Linuxbrew into a user defined folder

Llinuxbrew installation install the package on the home folder. For some reason I need to install Linuxbrew into a different folder. At the moment, I installed it and moved the whole folder into a ...
2
votes
0answers
49 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....
0
votes
2answers
68 views

Why does Linux allow a symbolic link to itself?

Because of a typo I found out that this is allowed: ln -s useless useless. Then, as expected ls useless/* triggers this error message: ls: cannot access 'useless/*': Too many levels of symbolic ...
0
votes
1answer
64 views

How should we understand symlinks under `/proc/pid/fd`?

They seems more like a link to inode instead a link to path. What does the readlink() mean to them, the canonical path of the inode from the calling process's root directory? What happened when a ...
2
votes
0answers
53 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 ...
1
vote
0answers
38 views

tail reopen file when directory changes

I've got a symlink pointing to the "latest" directory, and I want to tail a file in the latest directory, even if the symlink changes to a newly created directory. I often use tail -F for files and ...
2
votes
2answers
39 views

Symbolic link “ln” dot slash expansion

I want to create a symbolic link to a file in my current working directory. Say that I have a top level tree that looks like this: . ├── dir1 │   └── hello.so └── dir2 2 directories, 1 file I ...
4
votes
1answer
50 views

Can we create soft links that concatenate multiple files? [duplicate]

Let's say that I have files f1, ..., f9. I want to create a single view -- or a soft link -- say f, that displays a concatenated view over the 9 files. For example, if I execute wc -l f the answer ...
0
votes
2answers
89 views

How to regularly update symbolic link (ln -sf) via crontab

Background The PNG image files I want to use is stored in directories according to date, for example: /NAS-mein/data/201812/ PNG stored within it like /NAS-mein/data/201812/foo/bar/20181231_1500....
1
vote
3answers
40 views

Creating a folder that aggregates files from other folders

I'm trying to organise my directories for different classes such that each of them has a todo folder. something like this: |--classes/ | |--classOne/ | | |--todo/ | | | |--read.pdf | | |--...
0
votes
0answers
13 views

Broken link being created? [duplicate]

I gave the command as below and when i see it creates a broken link ln -s '~/Documents/....../Mean/W_P.dat' fort.11 The location I'm executing this file is different from the path of W_P.dat file.
5
votes
3answers
65 views

Comparing the time of a symlink

I want to check whether link lnkfile is older than a regular reference file reffile. The bash test builtin dereferences links, so test lnkfile -ot reffile compares the target of lnkfile, not the link ...
0
votes
0answers
53 views

Symlink resolution and the $ORIGIN variable in RPATH

Are symlinks resolved before or after the dynamic loader figures out the value for the $ORIGIN in the rpath from an executable? Longer explanation: I'd like to know if there's an standards-compliant ...
1
vote
2answers
190 views

How to make symlink executable?

I am using the Cloud9.io IDE. I have downloaded the Julia generic executable and extracted it. sudo wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.3-linux-x86_64.tar.gz tar xvzf ...
2
votes
0answers
37 views

Apache startup error with symlinked configuration file with 777 permissions

Ubuntu virtual machine with Apache 2.4.7 I'm getting these errors: apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf-enabled/...
1
vote
1answer
24 views

How to prevent from destroying symlinks, using Perl when to replace with sed regex?

Based on How do I prevent sed -i from destroying symlinks?, but I use Perl. I tried by middle of all these questions: Is there a way to make perl -i not clobber symlinks? perl symlink on gz file How ...
1
vote
1answer
96 views

Why don't FAT filesystems support links? [closed]

FAT filesystems represent files via linked lists of clusters (linked file allocation). They have a region on disk for one or more tables (File Allocation Table) which have as many entries as ...
0
votes
1answer
41 views

How to move physical disks content (rsnapshot content in there) to another physical disk?

Situation: simple linux system, with external removable usb media (rdx), single primary partition with ext4 filesystem on them for backups. Using some external usb disk media (rdx disks) for ...
2
votes
1answer
376 views

How to zip directory excluding symbolic links and the files they point to?

I have a directory with files, subdirectories and symlinks How to zip only files and folders from that directory without symlinks or files referred to by the symlink?
3
votes
0answers
116 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 ...
0
votes
1answer
45 views

Replace symlink with original file when edited

In a web project I used symlinks for shared data to save up space. The structure is one directory including the original data (e.g. css and js) and multiple directory with symlinks to the original ...
0
votes
0answers
27 views

Make a soft link ONLY resolvable as softlink

We have a 3rd party backup tool that is resolving a soft link (ORACLE_HOME) to the full physical path. It then can't find the DB as it's value of ORACLE_HOME doesn't match SAP/Oracle's version. I.e. ...
0
votes
1answer
26 views

Ensuring Alias /phpmyadmin /usr/share/phpmyadmin is frequent in all Apache virtual hosts whatsoever

I use Debian and Apache and say I have many virtual host files (above 20) and I want all of them to include this line in the end: Alias /phpmyadmin /usr/share/phpmyadmin The reason is to allow to ...
3
votes
2answers
194 views

Accessing PHPMyAdmin as installed by its distro package-index from the domain of each website

I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu. If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/...
0
votes
1answer
76 views

Creating Persistant Symbolic Link -Linux

I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached . I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using ...
0
votes
1answer
27 views

create symlinks by dropping version number

I have large number of shared libraries like this: libexpat.so.1.6.7 libqquicklayoutsplugin.so libstdc++.so.6.0.24 libexportlib.so.1.0.0 libqsvg.so ...
1
vote
1answer
33 views

Renaming parent directory of a directory that has symbolic links pointed to

I have created x number of symbolic links (ln -s path file) to a directory named templates that lives within mytheme directory. I would like to rename the theme folder but don't know the consequence ...
1
vote
0answers
47 views

How to append a new disk to an existing folder

I have a server with a program which rapidly writes data to a folder. I attached a new disk to the server, mounted it and now I want it to expand or replace the folder with data. The program works ...
1
vote
1answer
64 views

“ls -l” doesn't show symlinks source paths

Before I reinstalled MacOS, ls -l showed symlinks with their source path. Now ls -l shows symlinks as regular files - without the source path. How can I make it show the source path? I'm on a clean ...
0
votes
2answers
71 views

What is a good command for moving a directory containing relative symbolic links to files outside the directory?

I like to use relative symlinks when possible because they stay valid even when my filesystem is mounted in a non-root location, for example if I am accessing it remotely. However, if I move a ...
1
vote
0answers
287 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-...
0
votes
2answers
28 views

How to change relative symlinked path to “actual” one (in ranger or terminal)

What is actual path? Consider folder A in the file system and a symlinked B to it. Consider currently in ranger (or terminal) inside a sub-directory within B such as /home/B/sub1/sub2 which is in fact ...