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

learn more… | top users | synonyms (1)

1
vote
2answers
45 views

Unix equivalent of smart folders

What I want to do is present a directory, the contents of which are sourced from a series of other directories on the file system. It would be like a soft-link, only a link to multiple directories at ...
11
votes
2answers
606 views

Why does ln -s accept a single argument

> cd /tmp > ln -s foo > ls -alhF /tmp lrwxrwxrwx 1 user user 3 Jul 29 14:00 foo -> foo Is this a bug in ln or is there a use case for symlinking a file to itself? This is with ...
0
votes
1answer
32 views

Elegant Way To Store Dotfiles on GitHub

I need an elegant solution to store my dotfiles on GitHub for easy access. I tried to create a dotfiles directory and symlink all the dotfiles into there. Then I tried adding the symlinks to git and ...
3
votes
3answers
118 views

Symbolic link creation failing: change ownership issue

I am facing some issue with creating soft links. Following is the original file. $ ls -l /etc/init.d/jboss -rwxr-xr-x 1 askar admin 4972 Mar 11 2014 /etc/init.d/jboss Link creation is failing with ...
3
votes
1answer
25 views

Use symlink to move directory created by .deb package - will anything break?

Sometimes it seems useful to shift package's directories around between tmpfs / flash memory or ssd / hard disk. To manage flash lifetime, disk spin-up, or just free space. If you replace a ...
0
votes
1answer
44 views

Does Linux have any symlinks by default? [closed]

I have written a program that performs health checks on servers. One of its functions is that it can check whether or not a symlink exists. I am currently in the process of writing unit tests (for use ...
0
votes
2answers
26 views

Best practice to mount directory in /home to directory in /media?

I have 4 drives on my home server. 3 external drives mounted in fstab to three individual directories in /media. The fourth drive contains a headless debian os install. I want to mount a directory in ...
1
vote
0answers
28 views

Debian: How to resolve relocation error?

I am running Debian 7.1. I tried to apt-get install -f, and messed up. All command line returns ln: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version ...
-2
votes
2answers
44 views

How to find only the name of a link? [closed]

Specifically, I need to write a C program where I put inside the pathname of a symbolic link and on output I print only the name of that symbolic link(not the name of the file pointed by the link). ...
0
votes
1answer
23 views

sym link for android-studio/bin/studio.sh

I tried creating a symbolic link for android studio as such sudo ln -s android-studio/bin/studio.sh /usr/bin/asw I chose asw as the keyword to hopefully launch the executable studio.sh from anywhere ...
1
vote
1answer
38 views

Can see file in /usr/local/bin with ls, but attempting to run it yields file not found?

I'm on OS X, but since this is terminal work I figured this was the best place to ask. I'm trying to get Sublime Text to work at the command line via subl and having no luck. I ran ln -s <location ...
0
votes
2answers
37 views

Is it possible to create a virtual directory in Linux?

Like this way in Windows mklink /D Virtual_Folder_Here Real_Folder_Here. I was unable make work alias in Apache virtual sites in Windows so I made a virtual directory. Is this possible in Linux too?
0
votes
1answer
38 views

Creating an symbolic link in /bin automatically creates a second link in /usr/bin and the which command chooses /usr/bin

I just created an executable: ln -s /path/to/script.sh /bin/script then I check if everything succeeds and it does(/bin/script is created) but this has also created: /usr/bin/script and if I ...
4
votes
2answers
42 views

What is the difference in file size between Symbolic and Hard links?

I plan to keep all my movies in one giant folder, and then create other folders for the genres, while creating links for all the movies in the genre folder. This way I can organize movies into ...
0
votes
2answers
19 views

Asterisk behaviour in creating links

I am trying to create symbolic links for a set of files. Suppose I want to link all the files with the pdf extension from an origin_directory to my present directory. Up to now I have this command: ...
0
votes
0answers
16 views

ldconfig creates a link to a link to a library

Is it correct for ldconfig to create a link to a link which points to actual library, instead of creating a link pointing to a library? Example: [root@server lib64]# ll liblber* -rwxr-xr-x. 1 root ...
2
votes
1answer
29 views

Creating deep symlink

Some python packages has the following structure: python code in /usr/shared/pyshared/lib_name and symlinks on python sources in /usr/lib/python2.x/dist-packages/lib_name. However, lib_name in ...
2
votes
2answers
123 views

How do you add a bash script to your PATH variable using symlinks?

I run a gaming server called PocketMine. So basically I have a folder in my home directory that has a bash script to run the server: ~/PocketMine/start.sh Everytime I want to run the server I either ...
0
votes
2answers
52 views

Adding a new directory to PATH vs. a symlink for directory already in PATH

In setting it up so I could execute Sublime Text from bash, I discovered two methods of doing this via different tutorials: Method 1) Create a symlink from /usr/local/bin/subl to Sublime's bin dir: ...
1
vote
1answer
34 views

Creation of symlinks

I am following the tutorial http://www.olindata.com/blog/2013/12/building-ha-cluster-openvz-drbd-heartbeat-and-pacemaker. I got up to here: symlink folders in /var/lib/vz to /etc/vz The /etc/vz has ...
1
vote
1answer
35 views

Samba does not show symlinks

I am using samba under ubuntu 14.04 and I try to share a folder which includes a symlink to a directory that lies on an external drive. If I access the samba share from other devices (like android ...
2
votes
1answer
29 views

Duplicity include/exclude directories & symlinks

I'm trying to configure Duplicity to perform a system-wide settings backup. Among other things, I'd like to backup settings in /etc/portage/, the file /usr/src/linux/.config and the KDE autostart ...
1
vote
1answer
225 views

Create symlink - overwrite if one exists

I want to take down data in /path/to/data/folder/month/date/hour/minute/file and symlink it to /path/to/recent/file and do this automatically every time a file is created. Assuming I will not know ...
1
vote
2answers
41 views

Moving 4 system folders to 1 separated partition

Some background: I have installed Linux Mint 17 Cinnamon on my laptop SSD on a 10GB formatted partition and i have another HDD with 75GB, both ext4 formatted. The question part: I have two partitions ...
1
vote
1answer
25 views

Strangeness with Symlinks and Relative Paths

Could someone please explain this to me? I'm having trouble understanding how this is set up and why it behaves the way it does. I wanted to see where zsh is actually installed on a machine that I ...
2
votes
1answer
219 views

'Docker' File System - Compatibility with Symbolic Links

The question is marked in bold if you wish to skip the explanation of our situation. I work as a developer for a server network. We deploy multiple instances of our servers. we have 5 types of server ...
3
votes
2answers
74 views

List direct symbolic links (links that don't point to another symlink)

I need to make a list of all direct symbolic links in a directory, i.e. symbolic links that point to another file which is not a symbolic link. I tried to do it this way: for i in $(ls -1A); do ...
7
votes
2answers
183 views

How does the /proc/<pid>/exe symlink differ from ordinary symlinks?

If I start a process and then delete the binary of it, I can still recover it from /proc/<pid>/exe: $ cp `which sleep` . $ ./sleep 10m & [1] 13728 $ rm sleep $ readlink /proc/13728/exe ...
2
votes
1answer
343 views

Getting “Protocol Error” when trying to create a symlink in Docker

I'm trying to setup a symlink, using the command ln -s /var/www/data/cache/widget/overlay/ /var/www/public_html/images/overlay but it outputs ln: failed to create symbolic link ...
1
vote
1answer
19 views

Map Home to External Drive

Whereas I have my OS (in this case, Elementary OS Freya) installed on my non-partitioned internal hard drive, I have an external hard drive with /Documents, /Downloads, /Movies etc. where I store all ...
16
votes
3answers
626 views

When I cd through a symlink, why does pwd show the symlink instead of the real path?

I created a soft link (ln -s 1 2) to a directory which is inside the test directory and opened the soft link (cd 2) and displayed the current path using pwd. The displayed path was ~/test/2 and not ...
3
votes
6answers
102 views

How to copy a folder structure and make symbolic links to files?

I have a folder SOURCE that contains several sub-level folders, each with its own files.. I want to copy this folder in a new folder COPY where I need to copy the directory structure but keep the ...
14
votes
2answers
404 views

Is there anyway to automatically mount a filesystem when I open a symbolic link to a directory on that filesystem?

I am using Arch with Xfce. Recently, I have created a symbolic link to a directory on a filesystem. But I don't want to mount the filesystem during boot or manually mount it before I open the ...
3
votes
1answer
68 views

automate the process of fixing all broken links

There are lots of broken links in my system. I wrote a script to relink all broken links. But, after the scripts runs, find would again show me that the links still exists. This is my code: find ...
2
votes
2answers
122 views

What file mode is a symlink?

What file mode indicates that a file is a symbolic link (symlink)? My use case is to detect symbolic links inside a git repository (and its history). I was under the impression that a symlink is a ...
0
votes
2answers
60 views

Can Symbolic Links span different file systems in Unix or Linux

Can Symbolic Links span different file systems in Unix or Linux ??? I.e consider different file systems like ext2 and ext3 can symbolic link span them?
0
votes
1answer
30 views

How I can change all symlink to the new path [duplicate]

Please, I want to change the symlink to the new path My symlink's in this form lrwxrwxrwx. 1 s01 s01 56 Mar 22 13:17 zmjppcxlpq2m.png -> /home/s01/public_html/cgi-bin/uploads/00029/zmjppcxlpq2m ...
6
votes
2answers
189 views

How can I list files of which no symlinks exist?

I have a large "myfiles"directory full of miscellanous documents and do not want to modify its structure. I therefore created (several) other directories for each class of documents. For example I ...
0
votes
1answer
35 views

Is it possible to link file to an output of command line? [duplicate]

I want to create symlink, or a pipe, or something else that could be used in lieu of a file. I want that pseudo-file to execute a command and output of that command should become the contents of that ...
2
votes
1answer
100 views

How to verify the target of a symbolic link points toward a particular path

Within a bash script, I know I can check if a file is a symbolic link with the following syntax if [ -L $path ] Does any one know how I would test if that path was linked to a particular path? E.g. ...
0
votes
1answer
100 views

Links in /usr/bin or /usr/local/bin: hard or symbolic?

For the links located in /usr/bin and in /usr/local/bin, are they better to be hard or symbolic? They seem to be all symbolic? Why?
3
votes
1answer
56 views

How to avoid sed -i to destroy symlink?

Why does sed -i executed on symlink destroys that link and replaces it with destination file? How to avoid this? eg. $ ls -l pet* -rw-rw-r-- 1 madneon madneon 4 mar 23 16:46 pet lrwxrwxrwx 1 madneon ...
2
votes
3answers
45 views

list all symbolic links to valid directories only with find

I can use find /search/location -type l to list all symbolic links inside /search/location. How do I limit the output of find to symbolic links that refer to a valid directory, and exclude both, ...
1
vote
3answers
73 views

How can I create a relative symlink given a relative path?

I would like to programmatically find the directory depth of a relative path. So for example the depth of test/dir/hello is 3 More specifically I would like the directory depth so that I can create a ...
0
votes
1answer
43 views

Overhead when relocating a directory to a different file system using a symbolic link

I need to relocate some frequently accessed files to a different file system. The simplest way of doing this is to move the directory containing the files to the new file system and creating a ...
2
votes
2answers
61 views

copy files from the parent location when I am inside a symbolically linked folder

Suppose I have created two folders in /tmp called parent and child. child contains a file called test-child.txt and parent contains a file called test-parent.txt. Now lets go inside the parent and ...
0
votes
2answers
27 views

Create a symbolic copy of another directory that has it's own local data

I have a directory foo that contains files and directories. I want to create a new directory foo_0311 that contains the same files as foo (and sees updates when the files change), but that allows by ...
0
votes
1answer
25 views

How would I find any symlinks on my system that reference “/tmp”?

I need to create a list of all symlinks that reference the /tmp directory. How many are there in total?
1
vote
2answers
216 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, ...
2
votes
1answer
86 views

cp -a fails to copy symlinks on virtfs

Problem: Trying to copy the entire content of one directory to another which includes hidden files/directories and symlinks. This is fairly straightforward cp -a ${src} ${dst} It works as expected ...