A special type of file that references an inexistent or existing file or directory. The contents of a symbolic link consist of an arbitrary string that is the path to the file that the symbolic link points to. When the symlink is encountered during pathname resolution, the string stored by the file ...

learn more… | top users | synonyms (1)

1
vote
1answer
603 views

How does apache determine what directory to show from public_html?

I am using Ubuntu 12.04 and have configured apache to serve from ~/public_html. I am trying to serve some directory contents over http on LAN. When I did the following: ln -s ../Videos/android-...
2
votes
2answers
73 views

How to Find All .tex Files in Directories in Recurse Grep?

I want to expand the recursive search of symlinks to include only .tex files find . -type l -name "Math*" -exec grep -d "recurse" word {} +. Failed pseudocode 1 find . -type l -name "Math*" \ -exec ...
2
votes
1answer
167 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. ...
1
vote
0answers
13 views

Unix/Windows dualboot OS-dependent file

I'm currently in a dualboot setup, where I work in both Windows and Debian. I've set up my Android development environment to share as many files as possible to save drive space, including my ...
1
vote
1answer
158 views

apache Virtual Host Configuration CentOS7

My host machine is Windows 7 and guest machine is CentOS 7. I am a new to Apache and I am trying to create VirtualHost on CentOS7. I have read a lot of documentation and a lot of answers over ...
2
votes
2answers
78 views

Add trailing slash in bash completion of directory symbolic links

I have a symbolic link for a directory, e.g ln -s /tmp /xxx Now when I type /xx and press tab key, bash would complete the line to /xxx If I press it again it become /xxx/ Now, how can I ask bash ...
7
votes
1answer
847 views

sshfs breaks symlinks from SFTP server

Does anyone know how to mount a remote SFTP path via SSHFS so that you can work with symlinks? When I do this, all the symlinks I create point to the wrong files (not the ones I linked to.) All the ...
4
votes
1answer
161 views

Where is information about hard/soft links stored?

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
855 views

apache symlinks and dokuwiki

I am running a dokuwiki on an apache webserver. Usually I put media files into the directory /var/lib/dokuwiki/data/media. However, to be more flexible and to save disk space, it would be nice to use ...
1
vote
1answer
162 views

How to Relink these symlinks after moving the system?

I moved my filesystem and symlinks from Ubuntu 14.04 to 16.04 by using FAT32 memory card, which apparently broke those links; stopped using BitTorrentSync. Differential condition is that those links ...
2
votes
2answers
91 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? ...
0
votes
2answers
58 views

rsync --link-dest not working as expected with symlinks

I'm using rsync to backup some of my files: rsync -aEN --delete --link-dest="$CURR/" "$SOURCE/" "$NEW/" The --link-dest option works fine with most files, but not with symlinks. When I was writing a ...
2
votes
2answers
41 views

check if there is a link from the current file

How can I check if there is a link from the current file on Linux? Say, I have: touch foo ln -s foo bar ll foo bar bar -> foo foo Now, I want to know, if there are any file linked from foo:e.g....
3
votes
2answers
3k 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 ...
5
votes
1answer
160 views

Can GNU Stow use a stow directory that is a symbolic link?

Consider this script. #! /usr/bin/env bash mkdir -p target mkdir -p mydir/package/ touch mydir/package/file ln --symbolic mydir stow file stow stow --verbose --dir=./stow --target=./target package ...
3
votes
1answer
29 views

Use a symbolic link to redirect?

Is it possible to set up a symbolic link such that cd called on the link redirects to the linked path? Kind of like this: $ ln /A/B /B/C $ cd /A/B $ pwd /B/C $
3
votes
1answer
59 views

Removing file and its sym links

If I create a file and symlink to it e.g touch "example" ln -s "example" "link_example" and use rm example the symlink is still there. How can I delete file and all symlinks that points to that ...
1
vote
1answer
27 views

Can I replace a directory with a symlink without write permissions in parent?

I would like to replace a directory with a symlink. For the directory itself I have full permissions (rwx), but for the parent directory I don't have write permissions (r-x). Is this possible? The ...
2
votes
0answers
24 views

Mounting USB stick in place of HDD

I'm currently working on a raspian automated box. I've connected an HDD Drive to use as a Samba server and the download and temp folder for the transmission client installed. As the HDD is noisy (and ...
7
votes
4answers
16k views

Why change the owner of a symbolic link in linux?

In linux it's possible to change the owner or the group owner of a symbolic link (symlink). I was wondering why someone would want to do that, since permissions of a symlink are not used when ...
0
votes
0answers
59 views

Home folder GONE

Suddenly some of my files are not showing up in the browser. I decide to reboot and come back to a totally default home screen and home folder (all my files are gone). When I go to /home and type ls -...
1
vote
3answers
32 views

ln -s $SOURCE/* except - with find?

I want to do a symbolic link from all directories and files in the first node of $SOURCE to $HOME/Destination/. Pseudocode ln -s $SOURCE/* exceptThese $HOME/Destination/ Proposal find $HOME ! -...
7
votes
3answers
347 views

ln -s: from one source to many destinations

Pseudocode ln -s $HOME/file $HOME/Documents/ $HOME/Desktop/ where I want to create a symlink from the source to two destinations. Probably, moreutils and pee. How can you create many symlinks ...
0
votes
1answer
15 views

Inside a linked folder, doing “ls” to relative paths outside it shows the contents pointed by linked directory, not the source. Is this correct? [duplicate]

Suppose this directory structure: /folder1/ /folder2/ Now, if I enter cd /folder1 ln -s /folder2 linkToFolder2 cd /folder1/linkToFolder2 ls .. I thought that, given that pwd is /folder1/...
0
votes
1answer
27 views

How to Prevent Dropbox Access Elsewhere when Symlink?

I have the symbolic link ln -s $HOME/BTsync/masi/ $HOME/Dropbox/ I notice that contents in Dropbox GUI on Internet Browser are in conflict where masi directory has old files. I delete the ...
36
votes
3answers
34k 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 ...
2
votes
2answers
101 views

too many levels of symbolic links in /usr/bin — disaster?

I was recently trying to resolve an issue regarding a mismatch in the version of my java jre and java compiler, so I tried something suggested in this answer, which seemed to be relatively harmless, ...
1
vote
0answers
21 views

Copy directory tree, changing the target of absolute symbolic links

I wondered if there's an easy way to copy, scp, pipe tar, etc. host1:/base1/dir1 to host2:/base2/dir1. Other than the base directory, all the directory structure should be identical. `host1:/base1/...
0
votes
0answers
17 views

How to create symlink USB to COM port

I need help to create the udev rule. I need my my USB printer to be located as COM1. lsusb ouput: ‍Bus 001 Device 005: ID 0fe6:811e Kontron (Industrial Computer Source / ICS Advent) Parallel Adapter‍...
1
vote
1answer
75 views

Get the canonical path for a command

I'm writing a script that needs canonical path of certain commands. Since there could be symbolic links pointing to the actual commands, I use readlink -f to get the canonical path. But I'm not ...
0
votes
1answer
34 views

Full system backup with dd include symlinks

I'm really new in unix and Linux and just tried to learn something. My question is how can I make full system image/backup with dd include symlinks? Is dd good or I should use another approach? Can ...
2
votes
1answer
52 views

Is there a purpose to a symbolic link that points back to the directory containing it?

When Gogs docker installation is run it creates a symbolic link /data/git/git that points back to the parent folder: lrwxrwxrwx 1 1000 1000 9 May 13 19:37 git -> /data/git I'm ...
9
votes
2answers
6k views

find usage with -L

I have link -> file I do find -L . -name 'link' And get ./link Why is that? man find says: -L : Follow symbolic links. When find examines or prints information about files, ...
4
votes
5answers
495 views

What is a symbolic link made from? Understanding the structure of symlinks

I use Ubuntu 15.10 and I'm very new in Linux. After reading in Wikipedia what is a symbolic link in general, and after executing a symlink creation command in the Ubuntu Unix-bash terminal, I ought to ...
1
vote
1answer
829 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 ...
1
vote
3answers
1k views

Why does httpd give an error following a symlink into my home directory on Fedora?

I've just re-enabled an app after OS change. Symbolic link to it is located of course in /var/www/myapp . After changing permissions to 0775 (even 0777 temporary), changing owner to apache:myuser, ...
18
votes
1answer
14k views

How can I access a directory outside a chroot from within it?

I have a user which is chrooted to her home directory, but I want her to also be able to manage files within /var/www. As such, I did the following: root@server:/home/username# ln -s /var/www www ...
3
votes
2answers
33 views

“Junctioned” symbolic links

Does Linux have the capability to use "junctioned" symbolic links? I'm not sure if this is an actual term or not, so let me explain the concept. I have a git repository containing all my ...
0
votes
0answers
39 views

How to create a symbolic link of all files in a directory using a shortened name obtained with using a piped cut on the filename

I have a directory full of libraries (*.so.0.*), and I want to use find to create a symbolic link to each file, named *.so.0. Here is a (non working) try: find $HOME/.local/lib64/ -name "lib*.so.0.*"...
5
votes
3answers
600 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 '" . $...
1
vote
1answer
36 views

Getting symbolic links to behave more like shortcuts in Windows [closed]

I'm trying to launch a game from a symbolic link located on my desktop, but every time I do the game installs all its files onto my desktop. And when I try relaunching the game after moving all the ...
0
votes
1answer
41 views

Why can't I create a symbolic link in /usr/bin?

I'm trying to create a sym link in my /usr/bin directory as the command drush8 But every time I do it, it doesn't show up in /usr/bin but instead says it already exists. It's thinking that it exists ...
1
vote
2answers
29 views

How to work with symbolic links to directories

I am experimenting with symbolic links and I'm encountering a couple issues. The first is how after following a symbolic link to a directory to display the actual working directory instead of the ...
5
votes
2answers
490 views

Create symlink tree in existing directories

I carry all of my music around on a 1TB USB drive and have a udev rule to symlink it to $HOME/Music/ when I plug it in to one of my laptops, which it does. The issue I have is that this works fine ...
0
votes
2answers
42 views

Run a command which returns a string when reading a file [duplicate]

I have this idea and maybe it is not feasible, but I think it worth asking. Let's say a user is running this command: cat ~/file.txt Whenever something tries to read from this file, I would like ...
0
votes
1answer
79 views

Debian git error: undefined symbol: __gmpn_cnd_add_n

$ sudo apt-get install git $ git clone sth Cloning into 'a-folder'... git-remote-https: symbol lookup error: /usr/lib/x86_64-linux-gnu/libhogweed.so.2: undefined symbol: __gmpn_cnd_add_n ...
0
votes
1answer
30 views

cron not working with commands symlinked in custom PATH

I have a script job.sh in /home/user/scripts, which is then symlinked to /home/user/bin/job. The custom binaries path has been included in .bashrc, so whenever I issue the command job param1 etc from ...
14
votes
2answers
25k views

How do you make samba follow symlink outside the shared path

This is Ubuntu server 10.04 64 and samba 3.4.7. I have a shared directory /home/mit/share and another one /home/temp that I link into the shared one: ln -s /home/temp /home/mit/share/temp But on ...
1
vote
2answers
17 views

Is there a way to not create a sym link if the folder exists

I have something like folder A and when I do ln -s A a it creates the sym linked folder a now if I repeat the command ln -s A a I get the dead link a/A Is there a way that I can have ln fail if ...
21
votes
3answers
17k views

Determining if a file is a hard link or symbolic link?

I'm creating a shell script that would take a filename/path to a file and determine if the file is a symbolic link or a hard link. The only thing is, I don't know how to see if they are a hard link. ...