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
39 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
24 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
69 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
45 views

How to find the original file through multiple symlinks?

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
39 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
15 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
23 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
20 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
37 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
15 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
16 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
799 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
18 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
26 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
48 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
40 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
34 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
16 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
27 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
37 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
46 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
53 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
vote
1answer
47 views

When should you make a symbolic link instead of making an alias?

It's possible that making a symbolic link is not at all comparable to making an alias. But from what I understand about symbolic links so far, they do the same thing as setting an alias: they define a ...
5
votes
3answers
1k views

Create old style 'slow' symbolic links

ln -s creates 'fast' symbolic links. These break if you copy them (and their targets) to e.g. optical media. I believe old style 'slow' symbolic links would work, but how can I create them? There's no ...
0
votes
1answer
21 views

/etc/mtab as a symlink on Centos6

On a Centos6 system, can I delete /etc/mtab (the file) and create it as a symlink to /proc/self/mounts? As I understand it, starting from Centos7 (and other newer distros), the file /etc/mtab no ...
0
votes
1answer
29 views

Unable to create symbolic link of compiled executable to my PATH directory

I've compiled this build of the SameBoy Game Boy emulator with success. However I'm unable to ln -s the resulting executable to my PATH directory in ~/.bin/, as it returns too many levels of symbolic ...
0
votes
2answers
139 views

Access windows symbolic link from linux cifs

I have created symbolic link of the mapped drive (DOS share) on Windows 7 computer 200.90.12.25. The symbolic link was created using mklink command. Trying to access this from Linux (Raspberry PI) ...
0
votes
1answer
160 views

Preserve file permissions and symlinks in archive with 7-Zip

I have a directory test with three files, ls -l test: total 8 -rw-r--r-- 1 mb mb 16 Jul 25 11:12 regular_file -rwxr-xr-x 1 mb mb 19 Jul 25 11:02 script.sh lrwxrwxrwx 1 mb mb 12 Jul 25 11:14 symlink -&...
0
votes
1answer
26 views

Do programs themselves use symbolic links, or are they just for users?

For example, when I type python it runs python2 because for me, /usr/bin/python is linked to /usr/bin/python2.7 But does this affect programs? If there are programs on my system that need python 2, ...
1
vote
1answer
111 views

Apache 2.4 does not follow symlink and gives 403 Forbidden?

I have been trying to setup my project on localhost as symlink into /var/www/html, I can access normal files or directories placed inside html but when I create a symlink to some/other/path, it gives ...
0
votes
1answer
39 views

Trying to find examples of --strip-trailing-slashes

I find the --strip-trailing-slashes option of the mv command confusing. According to the official GNU manual, this option is "useful when a source argument may have a trailing slash and specify a ...
0
votes
2answers
33 views

Linking and Copying

I have a few questions regarding links in UNIX Can I say Soft links in UNIX are analogous to shortcuts in windows? Difference between copying and hard-linking? Can anyone give me a use-case where I ...
2
votes
1answer
47 views

Prevent mv from moving target folder

If symbolic link bar points to folder foo, then the two following commands have very different behaviors: mv bar baz # rename link 'bar' to 'baz' mv bar/ baz # rename folder 'foo' to 'baz' (...
1
vote
1answer
21 views

rsync update symlinks pointing to same directory

I want to use rsync to make a copy of a folder that contains symlinks to other files in the same folder. Is it possible to get updated symlinks -pointing to absolute paths- in the destination? I mean, ...
0
votes
0answers
32 views

How to get the original filename of symlinks in nginx?

From another script i got some generated symlinks. 2QGPCKVNG1R -> /anotherdir/movie1.mp4 HJS7J9ND2L5 -> /anotherdir/movie2.mp4 LKA6A9LA7SK -> /anotherdir/movie3.mp4 Displaying these files in ...
0
votes
0answers
40 views

Updatedb include the path pointed by symbolic link

I have created mlocate database with the contents of a particular folder. I see that the updatebd doesn't include the path pointed by the symbolic links in the database. How can I include the path ...
0
votes
1answer
47 views

Reconfigure dangling symlink libc.so.6

I didn't do the cleverest thing and changed the /lib64/libc.so.6 symlink - better still it points to something that doesn't exist - and best of all, the path it points to is within /lib/, a folder ...
0
votes
0answers
10 views

Extract name from symbolic link in bash [duplicate]

I have created symbolic links to files with cryptic filenames to avoid problems in my scripting pipeline. Now I need to research the original files. Therefore I need to get the original filename. ...
0
votes
1answer
61 views

what is difference between symbolic link file and executable file?

I was exploring the /bin directory. The /bin contains file of two different colours, which according to this answer correspond to: Green indicates executable file Sky blue indicates system link In ...
0
votes
1answer
22 views

Create a symbolic link containing certain subdirectories

Assuming I have the following directories: /source/dir1/sub1 /source/dir1/sub2 /source/dir1/sub3 /source/dir1/sub4 /source/dir2/sub1 /source/dir2/sub2 /source/dir2/sub3 /source/dir2/sub4 ... (...
0
votes
0answers
9 views

when run ycsb using Rocksdb, /proc/[pid]/exe link to java. Why exe file link to this file?

When run ycsb workload using Rocksdb(https://github.com/brianfrankcooper/YCSB/tree/master/rocksdb), /proc/[pid]/exe (thread's executable file made by Rocksdb) link(symbolic link) to java executable ...
3
votes
3answers
1k views

How to make a symlink read only (`chattr +i /location/symlink`)?

How can we lock a symlink so it cannot be deleted? With a normal file/directory chattr +i /file/location can achieve this but doing so with a symlink we get chattr: Operation not supported while ...
3
votes
1answer
160 views

Check if symlink is broken or doesn't exist

Trying to make an if statement that checks if a file is a valid symlink (meaning it also exists). I tried: [ -h "$1" -a ! -e "$1" ] ... buut it doesn't work. I want to execute code if the file isn'...
0
votes
1answer
20 views

Executing a symbolic link yields different results than executing the file to which it points

The context I've downloaded scilab-6.1.0.bin.linux-x86_64.tar.gz from the official website of "Scilab" because I want to be able to use the provided tools. Within the bin directory of the downloaded ...
0
votes
1answer
26 views

How to symbolic link the files to new directory based on names in text file?

I have a directory named STRBAM. In that, I have following .bam files that are symbolic linked from another directory. Sample-CK-4952-01A-01D-1719-10.bam Sample-A6-5656-01A-21D-A270-10.bam Sample-AZ-...
0
votes
1answer
26 views

How to remove a directory symlink without breaking files that depend on it?

For the sake of simplicity, suppose the following situation, where folder is a symlink to new_folder: . ├── folder -> new_folder/ ├── new_folder │   └── test.sh └── exectest.sh The contents of ...
0
votes
1answer
55 views

How preserve just read permission from an original file to a symlink?

I make a copy file, from directory A, as a symlink in directory B and I need to preserve just the read permission from original file to symlink. like this example: original file have –rwx-wxr-x, link ...
0
votes
1answer
40 views

Can you use symbolic links to always remove one layer of a directory tree?

Is it possible to use symbolic links or some other method, i.e. a 'virtual directory' or mount, by which the following is achieved, and persistent? Directory tree A, original root dir | +-- dir 1 ...
0
votes
2answers
24 views

Create Symbolic Link for Directory

I create a symbolic link for a directory, What links are the files in the directory and subdirectories? hard link or symbolic link?

1
2 3 4 5
20