Questions tagged [symbolic-link]
218 questions
233
votes
4 answers
Symlink not updating as expected when using an absolute with relative path
I am trying to use symbolic links. I did some reading and found the following commands:
Creation -> ln -s {/path/to/file-name} {link-name}
Update -> ln -sfn {/path/to/file-name} {link-name}
Deletion -> rm {link-name}
Creations and deletions work…
Jérôme Verstrynge
- 4,747
- 7
- 23
- 34
143
votes
9 answers
Find out symbolic link target via command line
Say that I setup a symbolic link:
ln -s /root/Public/mytextfile.txt /root/Public/myothertextfile.txt
is there a way to see what the target of myothertextfile.txt is using the command line?
Jared
- 1,577
- 2
- 12
- 12
117
votes
8 answers
How do I create a symbolic link in Windows?
Windows Vista added the ability to create symbolic links to files and directories. How do I create a symbolic link and what are the current consumer and server versions of Windows that support it?
cowgod
- 3,460
- 6
- 27
- 20
94
votes
3 answers
Perform rsync while following sym links
I have a directory that contains symbolic links to other directories located on different media on my system:
/opt/lun1/2011
/opt/lun1/2010
/opt/lun2/2009
/opt/lun2/2008
/opt/lun3/2007
But the symbolic links show up…
ensnare
- 2,132
- 6
- 23
- 39
46
votes
2 answers
how to update a symbolic link target (ln -f -s not working)
I'm using
ln -f -s
/var/www/html/releases/build1390
app-current
to update symbolic link "app-current" with a new destination.
However, this doesn't work, the link "app-current" keeps it original destination, however, I don't get any…
solsol
- 1,121
- 8
- 21
- 31
42
votes
4 answers
How to list symbolic link chains?
Given this example:
mkdir a
ln -s a b
ln -s b c
ln -s c d
If I execute:
ls -l d
It will show:
d -> c
Is there a way for ls or any other linux command to show d -> c -> b -> a instead?
Kalecser
- 523
- 1
- 4
- 5
32
votes
6 answers
How to create a symbolic link without using ln?
I deleted a critical symbolic link - libc.so.6. I have the file it should point at, but the basic commands such as ln or wget won't work anymore due to the link missing. However, echo or other Bash builtins work.
I am looking for a way to recreate…
Sebas
- 535
- 1
- 7
- 18
24
votes
4 answers
ln -s vs mount --bind
Is there any practical difference between using ln -s or mount --bind?
I want to move some folders to another partition, without changing their daemon setting, and wonder what approach I should take.
I prefer ln -s as it requires minimum setup (no…
SyRenity
- 3,159
- 11
- 55
- 79
20
votes
5 answers
Create NTFS symbolic links from within Linux
Is there a Linux utility that can create NTFS symbolic links? That is, a link on an NTFS partition that points to another NTFS folder - one that will work within Windows 7, specifically.
I wish to relocate a folder that is normally in-use while…
rymo
- 513
- 1
- 3
- 13
15
votes
2 answers
Symbolic link and filezilla over sftp
I'm pretty new to debian, and I'm trying to set up a server.
I have created a user who can only access his folder /home/username (and its subdirectory).
Now I want to use that user for the webserver I set up, and I have given him access to /var/www…
Doc
- 253
- 1
- 3
- 8
15
votes
1 answer
How can I prevent rsync replacing symbolic links with new directories in the target directory hierarchy?
I am using rsync(1) to synchronize files between a source area and a target area, where the target directory hierarchy contains symbolic links.
When a source directory has the same name and relative path as a symbolic link in the target area, then…
Henry
- 411
- 3
- 7
14
votes
1 answer
Force rsync to copy symlink, even if referent does not exist
I am getting this message with rsync:
symlink has no referent: "/a/path"
Well, rsync is right: in the source filesystem, the (symbolic) link is pointing to a non-existent location. That is intended. The target of the link only exists in the…
blueFast
- 4,000
- 13
- 36
- 51
14
votes
1 answer
How do I assign an SELinux label to a symlink with semanage so it persists after a relabel?
My apache DocumentRoot /var/www is a symbolic link to another path. The target has the appropriate file context label (httpd_sys_content_t) so that apache can read it with SELinux enabled. However, the symbolic link itself is labeled with…
Steven T. Snyder
- 1,063
- 2
- 10
- 19
13
votes
3 answers
What are possible drawbacks of an IIS 7 site having an NTFS junction as a web root?
I am trying to come up with a way to deploy ASP.NET code with as little site disturbance as possible. One thought was to set up the site to be served from an NTFS junction c:\www\example.com where
c:\www\example.com ->…
jayrdub
- 338
- 5
- 12
13
votes
1 answer
How do I find circular symbolic links?
I'm working on a HP-UX system and I want to find if there are any circular symbolic links.
So far I'm using the command:
ls -lrt `find ./ -follow -type l`
But it's only doing ls -lrt on current directory as result.
What command should I use to…
Vladimir
- 133
- 1
- 1
- 4