A special type of file that references a file or directory.
3
votes
4answers
201 views
find all symbolic links in a directory tree pointing outside that tree
I frequently move directory trees to other locations or copy their tarballs to other machines, and I would like to have a method to check whether any symlinks in a directory tree A point to locations ...
3
votes
2answers
159 views
Why is bash giving me (apparently) conflicting information about a file?
Background
I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1
I asked Bob to give me permission to read all contents of inputs:
[bob@server]$ ...
3
votes
3answers
363 views
Linux find and remove all symlinks relating to a directory
So, I have a bit of a situation where I created many symlinks in an attempt to get them to work, trying all sorts of combinations .. now I have this error:
ls: cannot access /etc/sv/me: Too many ...
3
votes
1answer
113 views
Can we use symbolic link and hard link for directories?
I know we can do that for files. What about directories?
It seems that cpanel uses that a lot.
3
votes
2answers
97 views
Symbolic Link local .jpg file to .jpg file on the internet
Is there any way to have a symbolic link that links a local .jpg file to a .jpg file on the internet in a l/unix environment?
3
votes
2answers
853 views
How do I copy a symbolic link?
I have a symbolic link to a file in one directory. I would like to have that same link in another directory. How do I copy a symbolic link?
I tried to cp the symbolic link but this copies the file ...
3
votes
2answers
187 views
Can I make a symlink point to different locations on different machines?
Before you say "no", a workaround would also be fine.
Here is the situation: I have two machines local and compile, both including the same ~ over nfs from a third machine files. I would like to have ...
3
votes
2answers
150 views
open a file using CDPATH and symlink
To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc:
export CDPATH=~/symlinks
When working with ...
3
votes
3answers
171 views
Absolute link pointers, able to work in another system
I have a folder and within it there are many links.
I make those links absolute, so that I can move them about within the folder and they still point to the same data. Relative links would break if I ...
3
votes
4answers
833 views
Accidental deletion of /lib directory in Fedora 15
I accidentally deleted the /lib directory on my Fedora 15 machine and I'm not sure how to go about fixing this. Any help in figuring out how to restore the directory along with symbolic links would be ...
3
votes
1answer
68 views
Symbolic link starting with .#
I have a symlink in one of my directories that has the following name:
lrwxrwxrwx 1 XXXX ZZZ 37 Jan 15 18:18 .#perl.org -> XXX@YYY.com.2980:1344441539
I am wondering what this symlink ...
3
votes
3answers
148 views
How to diff two folders by inodes
I'm currently using a script to backup files on my computer.
In a nutshell, it works like this:
rsync --link-dest=$FOLDER/current $SOURCE $DESTINATION
However, I think that my script may be ...
3
votes
2answers
2k views
How to create backup from symbolic links?
I have a directory with symbolic links to other directories. I want to archive the symbolic links, not as links but as archives containing the files of directories they refer to, using tar command. ...
3
votes
1answer
441 views
How to replace a symbolic link with a copy of a file it links to?
Having a (single, no batch filesystem processing needed) symlink, what a command line to use to replace it with a copy of the file it links to?
3
votes
5answers
1k views
How to make a variable symlink ? (or something similar)
How can I make a variable symlink that would point to a different location according to the current user? Is it possible? Should I use something else instead? A mount point? How?
Here is the problem ...
3
votes
1answer
277 views
FreeBSD: Remove symlinks in devfs
Background
I have been rebuilding a small home NAS. This server represents my first 'real' foray into the world of server administration and it has taught me quite a bit already. Originally, the ...
3
votes
2answers
622 views
Trailing slashes on symbolic links to directories
I'm trying to emulate the process of path resolution (see man page path_resolution) in unix-like systems.
My OS is Linux with GNU coreutils 8.7.
In order to clarify the meaning of extra trailing '/' ...
3
votes
1answer
592 views
Is there any way to rsync absolute symlinks alone?
I want to sync a big folder hierarchy between two machines.
I want to copy the contents of the symlinks if they are absolute, for eg it points to /some/folder/someFile
I want to retain the symlinks if ...
3
votes
2answers
81 views
Creating a local workspace for development/testing
I want to be able to mount, say /home/$USER/workspace to /usr/local/workspace.
Right now I'm using the python package pyfilesystem which uses fuse to do that. My problem is, that inside that mount I ...
3
votes
2answers
501 views
Syncing multiple home folders with dropbox and symlinks
To keep multiple computers synced with dropbox I tried the following.
Approach A.
-Computer 1: Install dropbox, dropbox folder: /Dropbox/
-Computer 1: Create symbolic link in that folder to home ...
3
votes
2answers
1k views
Use `ln` to create a missing directory
So I'm writing a small package manager, and a problem I've run into is making the symbolic links to files.
It installs the package to /usr/pkg/name-version, and then reads a file to determine what ...
3
votes
1answer
48 views
How do I batch-export all the content contained in symbolic links? (and then delete them all)
So as an alternative to Recursive scp without following links or creating a giant tar file? (this could be an emergency since the remote files could be deleted any time soon), I'm thinking of deleting ...
3
votes
0answers
201 views
No access to symlink folder on NTFS partition
I am using an NTFS parition for storing data I like to access both from Ubuntu and Windows 7. On my Ubuntu HOME partition, I like to link the folder Assets in order to access it from an application ...
3
votes
2answers
130 views
ln gives different results when run multiple times
I have this simple script to use with seventh sense (it's a lone wolf gamebook reader/player):
#!/bin/bash
GAME_PATH=$(dirname "$(readlink -f "$0")")
SEVENTH_SENSE_PATH=$(echo ...
2
votes
3answers
114 views
What has happened to the file when I entered “mv file.txt ../”?
I wanted to move 'file.txt' one folder up, but instead of mv file.txt ../file.txt I entered mv file.txt ../.
Now the file is gone and I didn't get any error message. So it seems the some action was ...
2
votes
2answers
157 views
How could I make multiple symbolic links for multiple directories, conveniently
lrwxrwxrwx 1 deploy users 20 1월 23 18:15 v122 -> /home/files/video122
lrwxrwxrwx 1 deploy users 20 1월 23 18:15 v123 -> /home/files/video123
lrwxrwxrwx 1 deploy users 20 1월 23 ...
2
votes
3answers
223 views
How universal is the -L (dereference symlink) switch of the 'ls' command?
I have some software that, among other things, needs to:
Assess a file's rwxrwxrwx permissions;
Work under every possible flavor of Unix and Linux you can find in the wild.
Currently, it does that ...
2
votes
3answers
247 views
Find only destination of symlink
For use in a shell-script, I'm looking for a commandline-way to get the destination of a symbolic link. The closest I've come so far is stat -N src, which outputs src -> dst. Of course I could ...
2
votes
2answers
134 views
Create a new link to access all files and folders
I get stuck to create a shell script for a new link something like that
link linkPathName orginalPathName
I want to create a link between a new link and original path; however, both can access ...
2
votes
1answer
397 views
Make cd follow symbolic links
I have my code mounted as an sshfs in my home directory, but the hierarchy is difficult to remember, so I created a symlink in my home directory leading to that directory. Is there a way so that when ...
2
votes
1answer
162 views
Why are there symlinks in /dev? (LVM)
[root@SERVER ~] ls -la /dev/vg/root
lrwxrwxrwx 1 root root 17 2012-10-28 10:29 /dev/vg/root -> ../mapper/vg-root
[root@SERVER ~]
QUESTION: Why are there symlinks? Why there couldn't be only 1 ...
2
votes
2answers
549 views
How does /dev/fd relate to /proc/self/fd/?
$ ls -l /dev/stdin /dev/fd/0
lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2
lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0
$ ls -l /dev/pts/2 ...
2
votes
2answers
504 views
Why is bash completion of a symlink different than a directory?
I usually do a find with an environment variable as the path when searching for source code. Recently I replaced my environment variable with a symbolic link, and it broke Bash's shell completion. ...
2
votes
2answers
86 views
Resolving symbolic links (pwd)
Say I do the following:
cd /some/path
ln -s /target/path symbolic_name
If then do:
cd /some/path
cd symbolic_name
pwd
I get:
/some/path/symblic_name
and not:
/target/path
Is there a way to ...
2
votes
1answer
90 views
Will symlinks be maintained if the target's path remains the same but everything is transferred to a new disk?
(I think the answer is yes, but I'd like to be certain before I actually do it!)
What I'm trying to do: install a new sd card in my "rooted" Android phone that uses A2SD. The fact that it's an ...
2
votes
1answer
1k views
Why can't list file/directory relative to .. from a symbolic link directory (No such file or directory)?
I have a /usr/tomcat6/logs directory linked to /var/log/tomcat6.
When I changed directory to /usr/tomcat6/logs and try to ls files using a relative pathname ../conf/Catalina/localhost, a No such file ...
2
votes
1answer
147 views
How do you increase MAXSYMLINKS
In a python script, I am creating a bunch of symbolic links chained together.
example: link1->link2->link3->.......->somefile.txt
I was wondering how you can change the max number of symlinks to be ...
2
votes
2answers
211 views
If symlink on NFS points to local disk, will advantage of local disk be lost?
I am working on a development network that uses NFS so that home directories etc can be accessed from any machine. However, NFS is occasionally flaky, causing slowdown/freezing of the machines.
I am ...
2
votes
2answers
298 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 ...
2
votes
1answer
187 views
Does Windows recognize Linux's symbolic links?
I was just wondering how a Windows system handles symbolic links. My best guess is that it will not recognize them, but I'm not entirely sure.
Also, what do Macs do when confronted by one?
2
votes
1answer
80 views
rsync: how to relocate absolute symlinks?
I've pored over the rsync manpage as well as on several related questions here on serverfault. I've played with -R and -L and -l options, but no luck.
Here is the question: when sending a dir from ...
2
votes
2answers
497 views
Recursive scp without following links or creating a giant tar file?
So I did a recursive scp on my remote fileserver (in another state) and it created an infinite loop of links on my remote web directory...
...
2
votes
1answer
242 views
Fix symbolic links after version change
Say I have a symbolic link to a file, which has its version in its name. (The file is actually a jar file) Now say, that the version changes, i.e the old file I linked to is deleted and a new one is ...
2
votes
1answer
716 views
Creating symbolic links to applications in Mac OS X
I installed Aquamacs in a fresh OS X desktop, and wanted to be able to call the program from the commandline.
Calling the file inside the app seems to work just fine:
Amoss-iMac:bin amosjyng$ ...
2
votes
1answer
265 views
How do I dereference links when extracting from a tar file?
If I have a tar file, bob.tar, which contains real_file and link_to_real_file, in which the latter is a symlink, is there a way to extract the contents of bob.tar so that link_to_real_file will not be ...
2
votes
2answers
2k 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 ...
2
votes
1answer
158 views
Exclude symbolic links to other filesystems with find -mount
I am working on a script that, among other things, extracts a list of all items in a directory (files and subdirs) for archival but it needs to skip remote symlinks (i.e. on other file systems). The ...
2
votes
1answer
143 views
Wikilink to a symbolic link in ikiwiki
I am running an ikiwiki for my personal use on my laptop via apache2 (os: ubuntu 10.04).
If I want to make a link to a local pdf-file I put the file into my scrdir and use the usual wikilink syntax. ...
2
votes
2answers
1k views
How to remove the directory a symbolic link links to plus the symbolic link?
Say a is a symbolic link to b. I am looking for a simple command to remove both a and b at once that does not require me to know about b.
2
votes
0answers
57 views
Using symbolic links and git to manage build versions
In general I follow the following workflow when I build any program (e.g. emacs, tmux, etc.)
/home/opt/[name of the program]/builds/[version]/
bin
lib
share
For example for a program like tmux I ...
