Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
14 views

Mount (or makefs or tunefs or cap or…) option to disallow symlinks?

(Other than mkfs.vfat, that is.) Is there a way in Linux to have a filesystem mounted but to prevent symlinks from being made on it? It's fine if this needs to happen at the time the filesystem is ...
2
votes
1answer
205 views

`ln -s` creates a symlink inside an existing folder instead of failing?

$mkdir lnTest1 lnTest2 $ln -s lnTest1 "lnTest2" There is NO slash at the end of "lnTest2"!! $ls lnT* -Rl |sed "s'$USER''g" lnTest1: total 0 lnTest2: total 0 lrwxrwxrwx 1 7 Jun 22 22:48 lnTest1 ...
3
votes
1answer
34 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
54 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
205 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 ...
2
votes
4answers
128 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 ...
1
vote
1answer
950 views

How to follow symlinks in NFS?

I have different disks with pictures /media/drive1/pictures/ /media/drive2/pictures/ /media/drive3/pictures/ /media/drive4/pictures/ # ... I have a folder called share which has symlinks for every ...
1
vote
1answer
206 views

ldconfig not following user-created symbolic link

I'm attempting to run Inkscape 0.48.4-15 (armv7) which is installed via pacman from Arch Linux ARM. $ inkscape inkscape: error while loading shared libraries: libMagick++-6.Q16HDRI.so.3: cannot open ...
4
votes
3answers
202 views

File permissions

I have a PHP script running which makes symlinks. To confirm which user it is: file_put_contents("testFile", "test"); $user = fileowner("testFile"); unlink("testFile"); echo "running as user '" . ...
0
votes
3answers
80 views

How do I create this symbolic link in Unix?

I want to run gmake when I run make, so I am creating a symbolic link. My gmake is inside /usr/local/dist. My make is inisde /usr/ccs/bin. Is this the correct command: ln -s /usr/local/dist/gmake ...
1
vote
3answers
41 views

Sharing a project tree between environments

To save space and time I copied a large project tree on a network drive as hard links, i.e. cp -a -r --link proj proj_B (background: it's huge, needs to be rebuilt from two incompatible ...
2
votes
2answers
99 views

How to create file links on a vfat filesystem of a mounted disk under Linux?

I have an external drive containing different pieces of music. The drive is a vfat formatted drive to be able to work with arbitrary devices. On the device I have music stored from different artists ...
1
vote
1answer
157 views

Creating/Removing a symbolic link when a USB device connects/disconnects

I'm working with an Arduino board and Matlab under Linux. Matlab, unfortunately, doesn't recognize the Arduino board when is connected unless I create a symbolic link to the Arduino board in /dev by: ...
2
votes
1answer
76 views

Capture symbolic link into Unix/Linux variables

Say I have a folder with a series of symbolic links: ussdv103:en195d; default$ pwd /oradba/app/oracle/admin/database1 ussdv103:en195d; default$ ls -ltr exp -> ...
1
vote
0answers
57 views

How do I replace symlinks in a path with their target within a script? [closed]

I want to extract part of a file path up to a symlink, use readlink to find the path to the link target, and then replace the link name with the actual path. This has to be done within a script. For ...
3
votes
2answers
133 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 -> ...
0
votes
1answer
299 views

Access through samba to link to different filesystem in shared directory (permission error)

I have a laptop with Dual Boot Lubuntu 14.04/Windows 7 I have a BorrajaX user in Lubuntu and another Borrajax user in Windows. In my Lubuntu $HOME/Documents/ directory I created a link to the ...
12
votes
2answers
444 views

How to define a symbolic link that I can use in all of my directories

Is it possible to write a symbolic link such that no matter where am I on the file system, I can use for example project to point the directory home/me/project? I would like to use commands like cd ...
5
votes
4answers
688 views

How do I get 'realpath' to find my symbolic link?

I am on MacOSX using bash as my shell. I have symbolic link, created like this: ln -s /usr/bin/python python2 I have a package that uses python2 and I want to create a symbol link in my current ...
0
votes
2answers
174 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
140 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
69 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
107 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
50 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
29 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 ...
3
votes
2answers
409 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
75 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
252 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
4k 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
3k 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
639 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
1answer
3k 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
68 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
286 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
63 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
113 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
141 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
61 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
114 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
503 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
138 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
58 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
363 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
112 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
73 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
136 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
274 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 ...