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

learn more… | top users | synonyms (1)

3
votes
3answers
1k views

Adding to path vs. linking from /bin

Our sys admin installed a software (Maven) on the server, and told everyone to add the "/usr/local/maven/bin/" folder to their path. I think it could be more convenient to just link the few programs ...
3
votes
6answers
154 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: ...
3
votes
2answers
1k 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 ...
3
votes
2answers
101 views

/etc files on a different partition

My setup requires that some of my /etc files reside on a separate partition. For this purpose I've created a softlink: ls -li /etc/group 956 lrwxrwxrwx 1 root root 21 May 7 15:48 /etc/group -> ...
3
votes
2answers
779 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 ...
3
votes
4answers
3k 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 ...
3
votes
2answers
631 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
731 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
2answers
58 views

Is there a way to condense ../.. parts of a path out programatically?

Say for example I have these types of paths to files in a script: /path/to/some/file/../../file1.txt Is there a command I can call such as readlink that will convert this path to its actual ...
3
votes
2answers
225 views

How Do I Block Read Access to a Symbolic Link?

I have this file structure: > APPLICATION 1 >> CONTROLLER (@JuniorProgrammers) >> MODELS (symlink to SHARED/MODELS) >> VIEWS (@Designers) > APPLICATION 2 >> CONTROLLER ...
3
votes
2answers
117 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
3answers
109 views

cp SOMEFILE .. copies to a different directory after cd'ing via a symbolic link

Consider the following setup: ~/Desktop/Public/subdir ~/Desktop/subdir --> ~/Desktop/Public/subdir (symbolic link) Now I do: cd ~/Desktop/subdir Which leads me into the linked directory. If ...
3
votes
2answers
327 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
226 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
200 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
1k 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
2answers
86 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 ...
3
votes
1answer
28 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 ...
3
votes
1answer
90 views

Test for link with trailing slash?

I created in /tmp/test/ mkdir somedir ln -s somedir/ somelink I want to loop through only directories: for file in */ ; do if [[ -d "$file" && ! -L "$file" ]]; then echo "$file is a ...
3
votes
2answers
130 views

Is there way to replace value of symbolic link? [duplicate]

Is there way to replace value of symbolic link? For example I want to replace symbolic link like this: first -> /home/username/foo/very/long/directories/that/I/do/not/want/to/type/again to ...
3
votes
1answer
96 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
327 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
1answer
509 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 ...
3
votes
1answer
56 views

Where are information stored information about hard/soft links

Where does the *nix system store information about number of hard links to a specific inode? I can't find any information about that. Everywhere what a hard link is but rarely a bit more advanced ...
3
votes
1answer
758 views

Why is permission denied for npm start using node-dev?

I am trying to start a node.js application with on a low permissions user. All the files I know of are owned by the correct user and have permissions set reasonably well. I'm trying to use a script ...
3
votes
1answer
354 views

How can I efficiently dereference all symlinks in `find` *output* filenames?

I need paths to be both fully resolved and relative to a given directory. This must be done efficiently, since the number of paths is often greater than 100,000. Situation: I have directories which ...
3
votes
1answer
41 views

Does the Linux loader (ld.so) follow symlinks?

I have stumbled upon a problem by trying to move the ld.so.cache file to another location. I have tried to create a symlink for it in its previous location -- /etc/ -- but it seems that the loader ...
3
votes
2answers
81 views

Gzip large amount of symlinked files

I have a folder containing a large amount of symlinked files. These files are each on the order of 10-11GB (fastq files to be specific). They come from a variety of source folders, but I made sure ...
3
votes
2answers
262 views

How do I make find follow most, but not all, symbolic links?

My OS and home directory are on an SSD. I store some large files on a hard disk, and symlink from my home directory to the hard disk (eg. ~/Videos/Films is a symlink to /mnt/hdd/Films). I also have a ...
3
votes
1answer
298 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 ...
3
votes
1answer
447 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
1answer
824 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
3answers
171 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
2k 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
0answers
28 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 ...
3
votes
0answers
51 views

auditing of symlink/symlinkat syscalls doesn't work here

I'm trying to monitor symlink/symlinkat syscalls of files under a specific directory, so I added two rules: auditctl -a exit,always -F arch=b64 -S symlinkat -F success=1 -F dir=/XX auditctl -a ...
3
votes
0answers
260 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 ...
3
votes
2answers
191 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
178 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
47 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
4answers
48 views

Generate multiple symbolic links with maitaining directory structure

I want to generate symbolic links from multiple folders with maintaining the directory structure. I read a few answers and the best thing i can come up with now is: find ...
2
votes
3answers
365 views

hardlink/softlink multiple file to one file

I have many files in a folder. I want to concatenate all these files to a single file. For example cat * > final_file; But this will increase disk space and also will consume time. Is there is a way ...
2
votes
3answers
780 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
1answer
84 views

Symlink with @ symbol?

I found that there is a symlink generated by ruby which has a @ sign at the path: default -> /Users/MyUserName/.rvm/rubies/ruby-2.0.0-p247@gemset The folder ...
2
votes
1answer
225 views

Why does ln -sf silently fail?

ln -sf source_file target_file succeeds even when source_file does not exist. ln -f source_file target_file on the other hand fail, as expected. How can it be tuned to give error on the first case ...
2
votes
2answers
1k views

Sublime command line open it twice

I just created a symbolic link to sublime: $ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl The problem is that it opens the last project and the open I want: $ subl my-project or $ ...
2
votes
4answers
4k views

How do I tell if a folder is actually a symlink and how do I fix it if it's broken?

How do I tell if I have a symlink, a shortcut of some sort, or a folder in Linux? Please see following screenshot. As you can see, the ls command lists objects where some are colored in dark blue ...
2
votes
2answers
243 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
2answers
661 views

Symlinks and EncFS

I am trying to secure my Dropbox account by using EncFS. My strategy is as follows: I store all my files in a folder called ~/Public/. The encrypted counterpart of ~/Public/ is ~/Private/. Use ...
2
votes
2answers
95 views

modify date of symlink on bindfs

I have the feeling that I cannot modify the date of symlinks on bindfs. See the following transcript of what I tried. On EXT4: nailor@needle:~$ mkdir /tmp/ex nailor@needle:~$ cd /tmp/ex ...