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

learn more… | top users | synonyms (1)

3
votes
2answers
582 views

Symlink all subdirectories in a directory to another directory

I'm trying to symlink every directory in a folder to another folder. For example, in the structure below, I need the subfolders symlinked to folder2. - /home/chris/folder1 -- subfolder1 -- subfolder2 ...
4
votes
1answer
81 views

Is there a command to move a file, and symlink it back to where it was?

I often find myself wanting to move a file, then create a symlink where it was. In doing this by hand I tend to twist my mind. (Esp after doing half a dozen files) Use cases: Moving all my "dot ...
0
votes
1answer
351 views

Always getting “not a symbolic link” message, while installing any package

When I am installing any package in my centos 6.0 system, by yum or rpm, I always getting /sbin/ldconfig: /usr/lib64/libreadXMLnew.so.1 is not a symbolic link message. There is never a problem in ...
5
votes
2answers
5k views

How to copy directory structure without removing symlinks?

I need to "install" a bunch of files to another directory keeping the directory structure of the source files intact. For example, if I have ./foo/bar/baz.txt going to /var/www/localhost/webroot/ I ...
4
votes
3answers
4k 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 ...
5
votes
1answer
818 views

Cannot delete broken symbolic link

I have a symbolic link formerly pointing to a Dropbox directory. I don't know what I did wrong, but apparently now it points to itself. hyper@mypi:/home/hyper/test$ ls -l total 1024 lrwxrwxrwx 1 ...
0
votes
1answer
21 views

Confused with symlinks - link created within a desired directory

during installation of the program, following window popped up: I continued with the installation and now I want to make symlink. The reason for this is that there is plenty of free space in ...
4
votes
2answers
5k views

How to remove a directory with “Too many levels of symlinks”

I have a bit of an odd problem on a RHEL system. On our systems we have our home directory automounted under /export/home. There are a few exceptions, as I'm experimenting with using gluster for our ...
1
vote
2answers
70 views

Something like a symbolically linked file, but with change details attached?

Is there a file type or method for using files in which certain files look and behave like symbolically linked files, but contain extra meta information for changing the data when they are read? ...
3
votes
1answer
404 views

ls -l --group-directories-first (act on symlinks as well)

ls option --group-directories-first causes directories to be listed on the top, which makes the output of ls nice and clean: ls -l --group-directories-first However, it does not act on symlinks, ...
3
votes
1answer
67 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 ...
1
vote
1answer
24 views

Good idea to symlink a virus database directory? [closed]

My Comodo Antivirus is installed in /opt/Comodo where its virus databases are stored in a directory /opt/Comodo/scanners which by far is the largest sized directory. I am running Crunchbang (debian) ...
3
votes
1answer
1k 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 ...
2
votes
3answers
124 views

Why can't I edit links and directories directly?

There are programs such as hexedit that allow one to edit each bit of a file, and as I keep hearing that in Unix "everything is a file", I tried to edit some directory, expecting bytes referring to ...
7
votes
3answers
152 views

How can I find out if a relative symlink is internal to a certain subtree or not?

I want to test if a relative symlink points within the subtree of a certain directory. This example would yield false since it points outside the foo directory: /foo>readlink bar ../fie.txt While ...
2
votes
2answers
66 views

Soft Link Detection

In my own LFS-based OS, I had created many softlinks. Soft-link can be deleted without harming the target. But is there any way that If I remove the a file or directory then, I will be notified ...
0
votes
2answers
135 views

Moving a folder to a NAS mount

I currently have a small Centos VPS which has some local SSD disk - I am getting close to my storage limit as I am storing a lot of flat files which are accessed very infrequently so I am looking at ...
3
votes
2answers
841 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 ...
1
vote
1answer
200 views

udev GROUP and MODE assignments on symbolic link have no effect

I'm trying to connect my velleman k8055 board per usb to my pc. For this I have the udev rule SUBSYSTEM !="usb_device", ACTION !="add", GOTO="velleman_rules_end" ATTRS{idVendor}=="10cf", ...
3
votes
0answers
66 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 ...
5
votes
2answers
544 views

Is symlink's target relative to the destination's parent directory and if so, why?

I've got the following file structure: build/ client/ –> index.js And when I try to create a symbolic link named "client" inside the build directory that refers to the client directory in the ...
1
vote
4answers
115 views

Symlink everywhere

Is there any way for me to symlink a particular file so that it appears in every directory on the system? So if I symlink /tmp/scratch No matter where I am I can type vi scratch?
1
vote
2answers
79 views

How to find a symlink when the location in which it was created is unknown?

I followed some slightly incorrect instructions to install my video driver. I executed this command blindly and don't know what directory I did it: sudo ln -s lib /usr/lib64 How can I find that ...
4
votes
1answer
141 views

`cd` up the canonical path

Consider: $ pwd /home/user $ ls -l total 3604 lrwxrwxrwx 1 user user 19 Nov 27 12:11 pages -> /var/www/pages/ $ cd pages $ pwd /home/user/pages $ readlink -f . /var/www/pages $ cd .. $ readlink ...
0
votes
2answers
350 views

Hard links versus symbolic links: which one is faster / smaller? [duplicate]

Hard links Given a file original.txt, a hard link hardlink.txt will point to the same inode and continue to exist even when original.txt is deleted. Symbolic links Given a file original.txt, a ...
-1
votes
1answer
109 views

find not working right

if [[ "$1" == "" ]] then leftarray=($(find . -type l -printf "%p\n" 2>/dev/null)) rightarray=($(find . -type l -printf "%l\n" 2>/dev/null)) for var in "${rightarray[@]}" do ...
0
votes
1answer
227 views

How to rebuild /etc/cron.d on CentOS?

I installed an RPM on a CentOS machine that was supposed to merge its own files contained in a /etc/cron.d structure with the current /etc/cron.d. However it replaced the current contents. I believe ...
1
vote
1answer
120 views

Create Relative Symlink Inside Relative Symlink

I've been browsing for a minute now trying to find a way to create a relative symlink inside a relative symlink, and what I mean by that is this... I have my CakePHP Templates Skeleton as a symlink ...
1
vote
2answers
74 views

Capturing the name of the file pointed by a symbolic link in a variable

Say I have a symbolic link: /path/to/foo->/path/to/some_file.txt Say I have a shell variable x=/path/to/foo, how can I get some_file.txt in a shell variable y?
10
votes
2answers
2k views

Convert absolute symlink to relative symlink with simple Linux command

I have a complete sub-filesystem inside a path /home/user/system containing the standard Linux structure with directories /bin, /home, /root, /usr, /var, /etc,... This sub-filesystem contain symbolic ...
2
votes
3answers
175 views

Hot to make diff check a symlink link itself?

In Linux one can use the command diff to check for differences of files. I use it to check for differences across two modules, both copied to /tmp. However, both modules have symlinks, which might ...
0
votes
3answers
210 views

thoroughly find all links (hard and symlinks, and any combination thereof) leading to a file/dir

I read "most" of the proposed questions, but I believe they all miss the complexity of the right answer. I want, only using "basic" commands (for maximum portability) (i.e., something that would work ...
10
votes
5answers
947 views

Is there an algorithm to decide if a symlink loops?

Unix systems usually just error out if they are confronted with a path that contains a symlink loop or just too many symlinks, because they have a limit to the number of symlinks they will traverse in ...
1
vote
1answer
687 views

Unable to stat symbolic link to file

Background I am trying to wrap my head around how html is unable to access a file via a symlink. I performed the following simple experiment to try and gain an understanding of how apache would be ...
0
votes
0answers
33 views

Symbolic link path [duplicate]

Hi I want to find out the path of symbolic link. I want to make a script for that but I can not find a command that will print the path of symbolic link. I want to write a script with directory as a ...
6
votes
2answers
381 views

Why wouldn't a symlink to a symlink work?

I've run into a weird issue when installing SWI-Prolog using homebrew on my OSX 10.9 box. I'm trying to debug it to figure out whose bug it is (SWI-Prolog's, homebrew's, or OSX's), so I can report it ...
3
votes
1answer
111 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 ...
4
votes
2answers
239 views

Force Bash 4 'globstar' option to ignore symlinks

Bash 4 has a fantastic option called 'globstar' that emulates (i.e. was stolen from) zsh's ** syntax for globbing across multiple directories. However, it's somewhat crippled (for my usage, at least) ...
1
vote
0answers
72 views

How can I make Krusader show real size of symlinked files?

In the "size" column in Krusader, there is a link's size noted, instead of the size of the actual file. This is the same as what ls -l shows (the full address of the target file, e.g. 64 B instead of ...
1
vote
1answer
486 views

find does not work on symlinked path?

If I run this command find $HOME/MySymlinkedPath -name "run*.sh" nothing happens, and gives no error ('MySymlinkedPath' is a symlinked path to another hard drive other then my $HOME one). These also ...
2
votes
1answer
106 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
436 views

How to Create Symlink Dynamically for Dynamically Created File in a Folder

I create a file based on time or something like that for stylesheet. It is fingerprinting filename to avoiding cached version on web browser. Example file name: style_1374065326.css. I want to create ...
3
votes
2answers
159 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 ...
7
votes
2answers
125 views

Why is there a mix of symlinks and hardlinks in /bin?

I understand the technical difference between symlinks and hardlinks, this is a question about their use in practice, particularly I'm curious to know why both are used in seemingly similar ...
3
votes
2answers
65 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 ...
4
votes
1answer
298 views

Advantage of symlinks over Windows style shortcuts

When I mainly used Windows, to make a shortcut, I could use a regular file detailing where it linked to, with the extension .lnk or .url Now, on Linux, I mainly use symbolic links, which are a ...
1
vote
0answers
110 views

Dereference copy with KDE Dolphin

From the cli I can dereference copy a symbolic link with cp -L. Is it possible to do this with the KDE Dolphin file manager?
3
votes
2answers
116 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 ...
5
votes
3answers
784 views

How can I edit symlinks?

My basic understanding of a symlink is as a special file, a file that contains a string path to another file. The kernel's VFS abstracts a lot of that away but is there any reason why symlinks seem to ...
7
votes
1answer
153 views

Can you change a dynamic link target without recompiling?

I downloaded a program that unfortunately doesn't come as a source distribution. When I go to run it, I get the error error while loading shared libraries: libjpeg.so.62: cannot open shared object ...