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
0
votes
2answers
59 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
851 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
21 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
63 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
15 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
41 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
15 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
41 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
26 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
6 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
64 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
11 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
15 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
32 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
44 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
52 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
36 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
198 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
13 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
55 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
48 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
12 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
46 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
21 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
50 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
291 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
79 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
50 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
42 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
16 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
43 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
26 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
71 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
48 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
18 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 ...
5
votes
3answers
921 views

Actual content of a symlink file

I searched but couldn't find anything - I am looking for a breakdown of the file structure of a symlink in bytes, in a ext filesystem. I have tried creating a symlink file and then using hexdump on ...
1
vote
1answer
19 views

Separately storing parts of text files and their reconstruction: symlinks with multiple targets?

I have two text files whose headers are different, while their contents is the same. $ cat original_file_v1 header 1 beginning header 1 contents header 1 end common contents line 1 common contents ...
0
votes
1answer
40 views

Error when creating symbolic links

I'm trying to create a symlink but ln says it exist. I cannot see it in FTP and the cd gives me an error. [root@vps82008 addons]# ln -s /root/sendsms/app/addons/sendsms /var/www/html/modul-cscart.com/...
0
votes
2answers
54 views

Can I boot over symlinks?

So I have multiple drives in my pc, but because of the Filesystem Hierarchy Standard it is very impractical to store progams and similar on those drives. I personally also just don't like having ...
0
votes
1answer
42 views

How to find evey softlink to a directory?

Take /etc dir as example. On my system it has 144 links. And as dir's can't have hardlinks (this is my understanding), the number 144 should refer to softlinks (1 original + 143 softlinks). $ ll -i ...
0
votes
1answer
36 views

How to 'apply' soft symbolic links

Is there a command to 'apply' a soft symlink? As in delete the symlink and make a copy of where the symlink pointed to and put it where the old symlink was. I could make a program or alias to do that, ...
0
votes
0answers
17 views

How to remove a symlink in Bash? [duplicate]

I have an old CentOS based, shared hosting environment with Bash 3.2.52; The hosting service team created a symlink from the directory www to the directory public_html, appearing in CLI as: www -> ...
1
vote
0answers
43 views

Rsync, remove source files, symlink

Need help with this one. I am trying to move some folders from source to destination with error handling (because mv failed to close files looking at rsync now) so far this is what I have. But it’s ...
0
votes
0answers
8 views

Tier script local to cloud?

I am looking for a way to basically tier from local storage to my gdrive. I want to keep specific files/folders local and let the rest to be moved and then symlinked to the original location. I am ...
0
votes
0answers
49 views

Move files & folders and Symlink

I am looking for a way to exclude some files/folder and mass move files/folders with spaces and special characters from source to destination and then symlink after move completes. So far I have ...
0
votes
2answers
47 views

recognize symlink from symlinked folder

Let's say I am in console in a subfolder, that is a child (or grandchild, etc.) of a symlinked (soft) folder. From the subfolder, if I do ls -la nothing indicates all the files are inside a symlinked ...
1
vote
1answer
95 views

Distant access to /home directory using bind or symlink

I have a hard drive Data(FAT32) and I want it to contain my /home/username directory and its content so that the /home/username directory is 'artificial'. I have attempted to : use symlink (ln -s /...

1
2 3 4 5
20