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 is used to modify the pathname resolution.

0
votes
1answer
43 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 ...
1
vote
0answers
48 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 ...
0
votes
0answers
18 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
26 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
46 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
53 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
12 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
55 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 ...
-1
votes
0answers
20 views

using script to change desktop folder location

I am using these commands to switch desktop folder just like kde activities using a script containing commands /bin/rm -f ~/Desktop sudo ln -s ~/Documents ~/Desktop Above creates a symlink ...
0
votes
0answers
31 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
79 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
32 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
20 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
62 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
24 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
120 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
50 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
42 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
25 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
13 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
190 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
59 views

Creating Persistant Symbolic Link -Linux

Could somebody assist me in creating a persistent symlink for the block devices, using udev ? I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached . I want to ...
0
votes
1answer
26 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
22 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
43 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
58 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
1answer
52 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
144 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
22 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 ...
-2
votes
1answer
39 views

creating test1 and test2 files in /var directory in Linux, [closed]

I need to create test1 and test2 files in /var directory in Linux , and creating Hard link for test1 file and soft link for test2 file in /tmp
1
vote
0answers
43 views

Error: Links are counted has space used on quotas [closed]

My OS is: CentOS Linux release 7.5.1804 (Core) This problem appeared after a linux update some time last month (i don't know when). Before that, everything was working fine. I have a folder on my ...
0
votes
2answers
40 views

Is there a simpler way to create a symbolic link to a file in the current directory than by typing out the complete filepath?

I know that when creating symbolic links the paths must be absolute, or relative to the destination location If I'm making a link in /usr/local/bin that points to a file in the current directory, is ...
1
vote
0answers
229 views

Why do I temporarily get 'Input/output error' reading a symbolic link in a NFS mount?

I use scp to copy some files to a XFS local partition on a file server host and create a symbolic link to new deployed files locally though SSH. That partition is exported through NFS and mounted on ...
0
votes
1answer
44 views

backup with tar

I have found that I need this command to make a full backup of the Etc folder tar cJPf /srv/dev-disk-by-label-Share/Myfiles/$(date +%F)-$(hostname)-etc-tar.xz /etc/ But what command do I need to ...
0
votes
1answer
27 views

The wrong links in gnubin but still work [closed]

I check the directory ls -l /usr/local/opt/coreutils/libexec/gnubin and come with $ ls -l /usr/local/opt/coreutils/libexec/gnubin total 0 lrwxr-xr-x 1 me admin 12 Oct 27 12:50 '[' -> '../../bin/g[...
0
votes
1answer
26 views

How can I set the access right to 'l' for every directory in a path (in an Andrew File System)?

I saved a java program (demo.java) in a university's linux server inside of a directory called "Codes". The Codes directory itself is in the Desktop folder. So the path of the java program is Home/Bob/...
0
votes
1answer
68 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
57 views

Host of issues stemming from too many symlink levels errors

On an AWS EC2 instance, I was upgrading imagemagick. Current installation was 6.8.x which is vulnerable, and I was moving it to 6.9.10-12 which if I read properly, I think it's patched. Somewhere ...
0
votes
0answers
26 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
506 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/...
4
votes
0answers
70 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
105 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
31 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
65 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
8 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
40 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
213 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 (...
0
votes
1answer
24 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
55 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 ...