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

learn more… | top users | synonyms (1)

7
votes
1answer
336 views

Is there a way to make perl -i not clobber symlinks?

A friend of mine points out that if you do: perl -pi.bak -e 's/foo/bar/' somefile when "somefile" is actually a symlink, perl does just what the docs say it will do: It does this by renaming ...
0
votes
1answer
421 views

Inconsistency in behavior of 'rm' when a mounted volume is involved?

If I run the following sequence of commands: mkdir dir ln -s dir link rm -r link/ I get this output: rm: cannot remove `link': Not a directory I get the warning because I could simply have ...
13
votes
2answers
1k views

pwd without symlinks

If I do pwd I notice it uses whatever symlinks I used to get into the current directory. Can I get it to tell me the "real" directory I'm in ... i.e. the path from the root to my current directory ...
1
vote
1answer
685 views

apache symlinks and dokuwiki

I am running a dokuwiki on an apache webserver. Usually I put media files into the directory /var/lib/dokuwiki/data/media. However, to be more flexible and to save disk space, it would be nice to use ...
9
votes
1answer
133 views

Strategies for maintaining a reference to a file after it was moved or renamed?

I've had a mac at work lately, and was amazed to see that Xcode would still find my latest project after I renamed its folder and moved it someplace else. Now I understand that this is the result of ...
0
votes
1answer
296 views

Keeping multiple root directories in a single partition

I'm working out a partition scheme for a new install. I'd like to keep the root filesystem fairly small and static, so that I can use LVM snapshots to do backups without having to allocate a ton of ...
6
votes
1answer
435 views

Why do some symbolic links affect program behavior?

One thing that has been puzzling me for some time is this: % which halt /sbin/halt % file /sbin/halt /sbin/halt: symbolic link to `reboot' However, executing sudo halt does, of course, not reboot ...
4
votes
2answers
447 views

Find incoming symlinks

In Linux, what is the best way to find all symbolic links that point to a given file (regardless of whether the symlink is relative or absolute)? I realize this will require scanning the whole ...
7
votes
2answers
1k views

Providing /bin and /lib inside a chroot jail

I need to be able to provide the /bin and /lib directories inside a chroot jail so that programs can dynamically link properly. Is there a way to accomplish this without making a copy of the /bin and ...
1
vote
1answer
306 views

Using find to find symlinks that point to a certain pattern of files

I have several directories that all have various symlinks in them. I want find (or another program) to find based on where the symlinks point to. For example this is how it currently works: ...
2
votes
2answers
3k views

How do I see what symlinks exist for a given directory?

I want to do some housekeeping in a directory, and I want to see if a given directory has any symlinks pointing to it. I can easily enough see what directory a symlink points to, but now I want to see ...
5
votes
1answer
6k views

Copy symlink AND where it points to using rsync

It doesn't need to be done by rsync, but it would be nice not have to write a script to do this, and rsync is very close to what I want. "rsync -a" (or -l) can preserve symlinks, and -L can ...
4
votes
4answers
427 views

Symbolic link and hard link questions

Let's say /A/B/c.sh is symbolic linked to /X/Y/c.sh. If c.sh has the command "./SOMETHING", '.' means /A/B/ or /X/Y/? How about the hard link?