A special type of file that references a file or directory.

learn more… | top users | synonyms (1)

1
vote
1answer
17 views

copy symlinks with rsync

When I'm trying to backup a disk with rsync, symbolic links are not resolved correctly. For example: media └disk1 ├folder1 │ └folder2 (symlink to /media/disk1/folder2) └folder2 After rsync ...
2
votes
2answers
88 views

Folder alias / Symbolic link to return to back folder

I need to create a folder "2015" which re-routes to ./ but I don't know what the command is. Not sure if the term is called in this case an alias (or symbolic link). So I need to make the same ...
2
votes
1answer
41 views

When is a symlink treated as the thing it links to, and as a symlink?

When is a symlink treated as the thing it links to, and as a symlink? A symlink can links to a file of different types. For example, let mylk be a symlink which links to a dir. The following two ...
2
votes
1answer
51 views

What happen if accidentally move a soft link followed by “/”?

I created a soft link to the current directory, $ ln -s "$PWD" math I then wanted to move it to another directory. $ mv math/ ~/dirlinks/maths/ I then realized I should $ mv math ...
2
votes
0answers
14 views

Unison replacing newer symlinks with older files using the option -force newer

I'm having a problem with Unison and symlinks. I created a test case for making it easier to understand and try this for yourself. First, we create the two directories that will be synced. And some ...
2
votes
4answers
192 views

Creating symbolic link recursively

I essentially want to run this command... ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/ /var/opt/gitlab/git-data/repositories/web/*/hooks This would create a symbolic link in all folders ...
1
vote
1answer
29 views

How to find out which package installed a symlink

In this question I describe my problems finding out the package that installed the final target of the /usr/bin/rename command. dpkg -S /usr/bin/rename did not give a result, but after first finding ...
1
vote
1answer
25 views

How to find the package that installed a comand, if “dpkg -S” finds no path because the command is a symlink?

While I was writing up a tag information for rename, I tried to look up with which package the rename command was installed. I ran the usual "dpkg -S" (also mentioned in this question): $ which ...
1
vote
1answer
47 views

How do I display information about all encountered symlinks in a given path?

How do I obtain a description of all encountered symlinks for the given path? Expecting output like this: $ linksinfo ~/.nix-profile/lib/libQt5OpenGL.so /home is a directory /home/nix is a directory ...
6
votes
1answer
122 views

cd and ls behave differently when inside a softlink to a dir

When we cd into a dir via its softlink, i observe: ls .. will show the content of the parent dir of the linked dir, while cd .. will go under the parent dir of the softlink. Why are they different? ...
-1
votes
1answer
24 views

Can rsync mirror a directory, without following symlinks linking outside the tree?

I want to mirror some home directories to a remote location, but don't want to follow links that point outside the tree. Links pointing with the directories themselves are okay. I also want the links ...
1
vote
1answer
41 views

du skip symbolic links

I cannot find an example of what I want to do and, from what I'm reading, the default behavior of du on my system is not the proper default behavior. If I ls my /data folder, I see (removing the ...
0
votes
1answer
154 views

Make Nginx follow symlinks

Nginx does not follow symbolic links. I get a 404 error. In my directory, I have this link: lrwxrwxrwx 1 root root 48 Sep 23 08:52 modules -> /path/to/dir/ but the files stored in ...
3
votes
1answer
40 views

read only symlink or something similar? [duplicate]

I created myself a NAT for home use (Ubuntu+Samba+Greyhole+Apache+MySQL+other web server related stuff). 90% of files I store there are pictures that i really don't wanna loose (that's why Greyhole). ...
1
vote
1answer
59 views

Finding duplicate files and replace them with symlinks

I'm trying to find a way to check inside a given directory for duplicate files (even with different names) and replace them with symlinks pointing to the first occurrence. I've tried with fdupes but ...
5
votes
1answer
114 views

Symbolic Link with Existing Directory

If I already has a directory (A) with existing contents and another directory (B), how do I symbolic link such that the two directory's content merge. eg. A -> folderA1/ ...
1
vote
1answer
38 views

get rsync to dereference symlinked dirs presented on cmdline like find -H

I'd love rsync to copy symlinks to dirs specified on the cmdline as dirs but leave all symlinks in the copied tree as is - like find -H, but the only way is a nasty hack of rsync -aR --rsync-path='cd ...
1
vote
1answer
45 views

Why ln -s creates relative broken links? [duplicate]

I have an issue with ln -s on Ubuntu 14.04, while using it in the following scenario: $ cd ~/programming/tmux/ $ ln -s tmux ~/bin/tmux $ ls -l ~/bin/tmux lrwxrwxrwx 1 USER USER 4 sie 31 11:02 ...
1
vote
1answer
38 views

some shared libs in /usr/local/lib aren't found but they are in /usr/lib

I can successfully run an executable using a symlink'd shared library in /usr/lib like so - sudo ln -s /lib/i386-linux-gnu/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.4 In the interest of making this ...
0
votes
1answer
36 views

how to change where a symlink points [duplicate]

Can you tell me what is this in red marker area. ? and if want to change /media/files/tb-prod/files to some other path, then how it will be .. ?
12
votes
2answers
1k views

What is the difference between 'rm' and 'unlink'?

Assuming you know the target is a symbolic link and not a file, is there any difference between using rm and unlink to remove the link?
1
vote
2answers
33 views

why are there links to links in system directories?

For example, the executable emacs: lrwxrwxrwx 1 root root 23 Jun 9 2012 /usr/bin/emacs -> /etc/alternatives/emacs llrwxrwxrwx 1 root root 18 Jun 9 2012 /etc/alternatives/emacs -> ...
38
votes
5answers
1k views

Is there a downside to deleting all of the broken symbolic links in a system?

I was running a script that iterated over all the files on my Linux system and created some metadata about them, and it threw an error when it hit a broken symbolic link. I am newish to *nix, but I ...
3
votes
1answer
43 views

Read target of symlink and increment target by one

I have a folder structure that looks like this /some/folder/1 /some/folder/2 ... and a symlink current that links to one of the folders. Is it possible and when how to read the target of the link, ...
4
votes
2answers
52 views

Find all symlinks to a directory and change target to another directory

I have a bunch of symlinks in /home to files and sub-directories in /foo. I want to target the new directory, /bar. My approach was to look at all invalid symlinks and verify that they were pointing ...
1
vote
0answers
46 views

What are some ways to update symlinks when the dir they point to are changed?

When the dir pointed by a symlink changes its name or ancestral dir(s), the symlink will not work. This happens often. Is there some more or less automatic way to make a symlink keep track of that? I ...
0
votes
0answers
55 views

Avoid infinite loops in file operations

In many programs, such as in this example filezilla, when I go to use certain directories they get stuck in an infinite loop. So I might be uploading a folder to an FTP server, but this folder links ...
8
votes
2answers
415 views

Java location from /usr/bin/java

I'm trying to find my java location within my Linux system and got this [980@b449 ~]$ which java /usr/bin/java [980@b449 ~]$ readlink -f $(which java) ...
2
votes
3answers
56 views

Creating symbolic links

When creating a softlink how do add the path, I did the following: ln -s file1.txt /home/user9000/Desktop/SymbolicLink.txt When I see the softlink on the desktop it marks that the doc doesn't ...
0
votes
1answer
37 views

Point folder on main HDD to newly mounted 2nd HDD

What is the best way to point a folder in one of my websites directory to a folder in a second HDD I just had installed? I see things about fstab and symlink but am lost at what is the best way to do ...
0
votes
1answer
34 views

Providing ftp access (of selected files) to users from a hashed repository of unique files

We have a portal where each user has an account and a file repository that goes with it. Whenever any user uploads a file using a form, the php app hashes the file contents first and checks to see if ...
3
votes
0answers
43 views

Why do slackware packages recreate symlinks after installation?

Reading through slackware's makepkg script, I saw that rather than putting symlinks directly into the package, it deletes them and generates a script called doinst.sh that recreates them after ...
0
votes
1answer
29 views

Symbolic linking to ~/ instead of ~/[path/file]

I moved all of my dot files out of ~/ in to ~/data/dotfiles I then did ln -s ~/data/dotfiles/[filename] ~/ My intention was ln -s ~/data/dotfiles/[filename] ~/[filename] This included my .vimrc , ...
2
votes
2answers
53 views

Create an absolute symbolic link to the current directory

I am now under a directory with very long path. For future visiting it quicker, I would like to create a link to it. I tried ln -s . ~/mylink ~/mylink actually links to ~. So can I expand ~ into ...
2
votes
1answer
55 views

understand the designation of symbolic links

I have a number of files in /etc/rc3.d/ directory which all are symbolic links and point to files in /etc/init.d/ directory using ../init.d/ designation. For example file S18rsyslog in /etc/rc3.d/ ...
2
votes
2answers
102 views

Fast and slow symlinks

From http://en.wikipedia.org/wiki/Symbolic_link#Storage_of_symbolic_links Early implementations of symbolic links stored the symbolic link information as data in regular files. The file ...
0
votes
1answer
169 views

Why absolute symlink on SAMBA share is followed directly by CIFS mount?

If an SMB share has a symlink with an absolute path /share/latest/dir -> /share/data/201407 then Windows clients can access files by link with no problem. dir \\smbserver\share\latest\dir\ ...
8
votes
3answers
238 views

Going into a directory linked by a link

When I cd a link, my current path is prefixed with the link's path, rather than the path of the directory the link links to. E.g. ~/dirlinks/maths$ ls -l logic lrwxrwxrwx 1 tim tim 71 Jul 27 10:24 ...
0
votes
1answer
40 views

“Links” to dirs that have features of both hard and soft links?

It is not allowed to create a hard link for a dir. But the soft like will not work, if I later change the name of the dir. How would you solve the dilemma? Are there applications which can ...
1
vote
2answers
108 views

Symlink from one workstation to another without mount

I am trying to create a symlink of a file on one linux workstation to another linux workstation, without having to 'mount' any network shares. Here's what I am trying to do, but can't get it to work. ...
10
votes
2answers
363 views

Strange difference between pwd and /bin/pwd

I added a symlink to the current directory with ln -s . aa. If I execute cd aa, and after that I executed pwd, the response is /home/sim/aa. But if I execute /bin/pwd it prints /home/sim (the current ...
0
votes
1answer
32 views

Convert linux symlink to osx symlink

I have transferred a folder from a linux machine to a macbook pro with osx 10.9, now I am having trouble with the symlinks in this folder (lots of them). In linux if I do vi link2file.txt, it has the ...
0
votes
1answer
59 views

Symbolic link permission changes [duplicate]

I would like to change the symbolic permission[lrwxrwxrwx] to 755. I've used the command to try and change the permissions and it's not working. $ chmod -R 755 symbolic link folder
3
votes
6answers
259 views

ls content of a directory ignoring symlinks

I have a directory in which I would like to list all the content (files and sub directories) without showing the symbolic links. I am using GNU utilities on Linux. The ls version is 8.13. Example: ...
0
votes
0answers
223 views

g++: error: /usr/lib/libGL.so: No such file or directory after uninstalling AMD drivers

This is a question asked several times all over the internet. Duplicates: http://askubuntu.com/questions/395544/g-error-or-nosuch-file-or-directory ...
6
votes
1answer
101 views

Filetype and dereference when listing directory with LS command

I'm trying to combine arguments to the ls command to list a directory content. What I'm basically trying to achieve is listing the directory dereferencing all links, but showing explicitly that the ...
3
votes
2answers
205 views

Make firefox command run downloaded firefox instead of iceweasel

I have downloaded Firefox, but when I run firefox in Alt+F2 (Gnome 3.4.2), Iceweasel runs instead. I used the type command to find the file apparently responsible for this: #!/bin/sh ...
0
votes
0answers
14 views

Mount (or makefs or tunefs or cap or…) option to disallow symlinks?

(Other than mkfs.vfat, that is.) Is there a way in Linux to have a filesystem mounted but to prevent symlinks from being made on it? It's fine if this needs to happen at the time the filesystem is ...
2
votes
1answer
179 views

`ln -s` creates a symlink inside an existing folder instead of failing?

$mkdir lnTest1 lnTest2 $ln -s lnTest1 "lnTest2" There is NO slash at the end of "lnTest2"!! $ls lnT* -Rl |sed "s'$USER''g" lnTest1: total 0 lnTest2: total 0 lrwxrwxrwx 1 7 Jun 22 22:48 lnTest1 ...
3
votes
1answer
33 views

How to create a relative symlink which works across PC

I have the following directory structure to start with ~/a/bin ~/a/src -> /home/user/b/sync/src I created a symlink cd ~/a/src ln -s ../bin bin-xyz now bin-xyz is a broken link, and there is ...