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

learn more… | top users | synonyms (1)

0
votes
2answers
42 views

ln -s with a path relative to pwd

I'm trying to create a bunch of symbolic links, but I can't figure out why this is working ln -s /Users/niels/something/foo ~/bin/foo_link while this cd /Users/niels/something ln -s foo ...
1
vote
3answers
72 views

Seemingly Inconsistent Behavior for “ln” & “ln -s”

As we all know, the ln command creates a link, with the default being a hard link and the -s option creating a symlink. The general syntax is ln [-s] OLD NEW, where OLD is the file you are linking to ...
0
votes
1answer
43 views

Trouble creating symbolic link [closed]

I installed a software on OpenSUSE. However, to open it one has to type /usr/local/software/start_software everytime. I tried creating a symbolic link using sudo ln -s ...
2
votes
1answer
38 views

Why store program code in /var/cache?

I have inherited a Java / Tomcat stack, running on Ubuntu. It has crashed and I am trying to restart it. The program code seems to be using a config file which I have found on the file system. The ...
0
votes
1answer
22 views

Specify a fallback file for a broken symbolic link

I want to create a symlink, foo.txt, needed at system startup, to another file, bar.txt on a different mount point. The mounted partitions are different physical drives as well. ln -s /baz/bar.txt ...
1
vote
1answer
26 views

“ls -lH” not following the link but “ls -lH linktofile” following it

In a directory there is a link to some other file in some other directory. If I give ls -lHh command with no arguments, ls does not resolves the symbolic link but if I give ls -lHh * or ls ...
2
votes
2answers
20 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
61 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
27 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 ...
4
votes
2answers
177 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 ...
2
votes
3answers
240 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
115 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
15 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
1answer
379 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
50 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? ...
4
votes
1answer
40 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
42 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
19 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
257 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
81 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
88 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
43 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
48 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 ...
2
votes
2answers
71 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
39 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
35 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 ...
4
votes
2answers
117 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
88 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
46 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
129 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
113 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
51 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
127 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
58 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
53 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
338 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
2answers
56 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
120 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
347 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
195 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
1answer
285 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
62 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
111 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
45 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
96 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
67 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
145 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 ...
2
votes
2answers
98 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
108 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 ...