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

learn more… | top users | synonyms (1)

3
votes
2answers
201 views

ln gives different results when run multiple times

I have this simple script to use with seventh sense (it's a lone wolf gamebook reader/player): #!/bin/bash GAME_PATH=$(dirname "$(readlink -f "$0")") SEVENTH_SENSE_PATH=$(echo ...
3
votes
1answer
53 views

read only symlink or something similar? [duplicate]

I created myself a NAT for home use (Ubuntu+Samba+Greyhole+Apache+MySQL+other web server related stuff). 90% of files I store there are pictures that i really don't wanna loose (that's why Greyhole). ...
2
votes
3answers
189 views

What has happened to the file when I entered “mv file.txt ../”?

I wanted to move 'file.txt' one folder up, but instead of mv file.txt ../file.txt I entered mv file.txt ../. Now the file is gone and I didn't get any error message. So it seems the some action was ...
2
votes
2answers
61 views

Create an absolute symbolic link to the current directory

I am now under a directory with very long path. For future visiting it quicker, I would like to create a link to it. I tried ln -s . ~/mylink ~/mylink actually links to ~. So can I expand ~ into ...
2
votes
4answers
150 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 ...
2
votes
2answers
4k views

How to create a shortcut to a folder to Documents

I have a folder in /media/sf_fedora which I want to access from Documents instead of going into /media each time, how can I create a shortcut. The 'Make Link' is grayed out in the Edit menu for some ...
2
votes
3answers
512 views

hardlink/softlink multiple file to one file

I have many files in a folder. I want to concatenate all these files to a single file. For example cat * > final_file; But this will increase disk space and also will consume time. Is there is a way ...
2
votes
2answers
2k views

Sublime command line open it twice

I just created a symbolic link to sublime: $ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl The problem is that it opens the last project and the open I want: $ subl my-project or $ ...
2
votes
3answers
1k views

How universal is the -L (dereference symlink) switch of the 'ls' command?

I have some software that, among other things, needs to: Assess a file's rwxrwxrwx permissions; Work under every possible flavor of Unix and Linux you can find in the wild. Currently, it does that ...
2
votes
4answers
207 views

Creating symbolic link recursively

I essentially want to run this command... ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/ /var/opt/gitlab/git-data/repositories/web/*/hooks This would create a symbolic link in all folders ...
2
votes
4answers
6k views

How do I tell if a folder is actually a symlink and how do I fix it if it's broken?

How do I tell if I have a symlink, a shortcut of some sort, or a folder in Linux? Please see following screenshot. As you can see, the ls command lists objects where some are colored in dark blue ...
2
votes
1answer
101 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
316 views

Why does ln -sf silently fail?

ln -sf source_file target_file succeeds even when source_file does not exist. ln -f source_file target_file on the other hand fail, as expected. How can it be tuned to give error on the first case ...
2
votes
2answers
315 views

Create a new link to access all files and folders

I get stuck to create a shell script for a new link something like that link linkPathName orginalPathName I want to create a link between a new link and original path; however, both can access ...
2
votes
2answers
716 views

Symlinks and EncFS

I am trying to secure my Dropbox account by using EncFS. My strategy is as follows: I store all my files in a folder called ~/Public/. The encrypted counterpart of ~/Public/ is ~/Private/. Use ...
2
votes
3answers
2k views

$PWD variable equivalent of pwd -P

I want to use the $PWD variable in a script, but I want it to be the hardware path without symlinks. I know about /bin/pwd and pwd -P, but those aren't variables. I know that I can use: setenv MYPWD ...
2
votes
1answer
526 views

Why are there symlinks in /dev? (LVM)

[root@SERVER ~] ls -la /dev/vg/root lrwxrwxrwx 1 root root 17 2012-10-28 10:29 /dev/vg/root -> ../mapper/vg-root [root@SERVER ~] QUESTION: Why are there symlinks? Why there couldn't be only 1 ...
2
votes
2answers
44 views

ls doesn't give me the same as cd + ls to the same folder

$> ls ../../../../.. Doesn't give me the same result as $> cd ../../../../.. $> ls Why? Something with links? What's going on? [ johanrj@jamin ] ...
2
votes
2answers
98 views

Folder alias / Symbolic link to return to back folder

I need to create a folder "2015" which re-routes to ./ but I don't know what the command is. Not sure if the term is called in this case an alias (or symbolic link). So I need to make the same ...
2
votes
1answer
292 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 ...
2
votes
1answer
1k views

If I rm -rf a symlink will the data the link points to get erased, too?

This is the contents of the /home3 directory on my system: ./ backup/ hearsttr@ lost+found/ randomvi@ sexsmovi@ ../ freemark@ investgr@ nudenude@ romanced@ wallpape@ I want to clean ...
2
votes
2answers
3k views

Create symbolic links with wildcards

I have multiple hard drives with the same directory hierarchy, for example: /media/sda/dir1 /media/sda/dir2 ... /media/sdb/dir1 /media/sdb/dir2 Two hard drives with similar names and similar ...
2
votes
1answer
113 views

Will symlinks be maintained if the target's path remains the same but everything is transferred to a new disk?

(I think the answer is yes, but I'd like to be certain before I actually do it!) What I'm trying to do: install a new sd card in my "rooted" Android phone that uses A2SD. The fact that it's an ...
2
votes
1answer
2k views

Why can't list file/directory relative to .. from a symbolic link directory (No such file or directory)?

I have a /usr/tomcat6/logs directory linked to /var/log/tomcat6. When I changed directory to /usr/tomcat6/logs and try to ls files using a relative pathname ../conf/Catalina/localhost, a No such file ...
2
votes
1answer
44 views

When is a symlink treated as the thing it links to, and as a symlink?

When is a symlink treated as the thing it links to, and as a symlink? A symlink can links to a file of different types. For example, let mylk be a symlink which links to a dir. The following two ...
2
votes
1answer
64 views

understand the designation of symbolic links

I have a number of files in /etc/rc3.d/ directory which all are symbolic links and point to files in /etc/init.d/ directory using ../init.d/ designation. For example file S18rsyslog in /etc/rc3.d/ ...
2
votes
2answers
151 views

Fast and slow symlinks

From http://en.wikipedia.org/wiki/Symbolic_link#Storage_of_symbolic_links Early implementations of symbolic links stored the symbolic link information as data in regular files. The file ...
2
votes
2answers
146 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 ...
2
votes
3answers
119 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 ...
2
votes
1answer
1k views

Ignore Symlinks when Extracting Tarball

I have a relatively simple question that I cannot seem to find the answer for. I am attempting to extract a tarball (*.tgz, to be exact) and receiving terminal errors on extracted symlinks. ...
2
votes
2answers
4k views

Recursive scp without following links or creating a giant tar file?

So I did a recursive scp on my remote fileserver (in another state) and it created an infinite loop of links on my remote web directory... ...
2
votes
2answers
411 views

If symlink on NFS points to local disk, will advantage of local disk be lost?

I am working on a development network that uses NFS so that home directories etc can be accessed from any machine. However, NFS is occasionally flaky, causing slowdown/freezing of the machines. I am ...
2
votes
1answer
888 views

Extended attribute on symbolic link

I'm trying to set some extended attributes on a symbolic link on Fedora 15. According to setfattr's usage, there is an option -h for such purpose: setfattr 2.4.44 -- set extended attributes Usage: ...
2
votes
1answer
25 views

Soft Link created for new software installation

When we install a new software, after extraction the below steps are performed generally: move the files to /opt/folder create the symlink sudo ln -s /opt/folder/application_folder_name ...
2
votes
3answers
72 views

Creating symbolic links

When creating a softlink how do add the path, I did the following: ln -s file1.txt /home/user9000/Desktop/SymbolicLink.txt When I see the softlink on the desktop it marks that the doc doesn't ...
2
votes
1answer
128 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 ...
2
votes
2answers
63 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 ...
2
votes
3answers
158 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 ...
2
votes
1answer
262 views

Canonical paths: why are they needed?

The issue of resolving symlinks (symbolic links) is often addressed on this forum, and on others. Related are the concepts of relative, absolute (or full), and canonical (or resolved) pathnames. Two ...
2
votes
1answer
555 views

Fix symbolic links after version change

Say I have a symbolic link to a file, which has its version in its name. (The file is actually a jar file) Now say, that the version changes, i.e the old file I linked to is deleted and a new one is ...
2
votes
1answer
2k views

In Ubuntu, is there a way to virtually merge two folders without unionfs or aufs?

I've got a source control system at work that I can't modify which scatters a bunch of files in unfortunate places. My IDE expects these folders to be in a single unified location. Normally I'd just ...
2
votes
1answer
2k views

Creating symbolic links to applications in Mac OS X

I installed Aquamacs in a fresh OS X desktop, and wanted to be able to call the program from the commandline. Calling the file inside the app seems to work just fine: Amoss-iMac:bin amosjyng$ ...
2
votes
2answers
898 views

How do I dereference links when extracting from a tar file?

If I have a tar file, bob.tar, which contains real_file and link_to_real_file, in which the latter is a symlink, is there a way to extract the contents of bob.tar so that link_to_real_file will not be ...
2
votes
1answer
1k views

How synchronize two disks (or folders) using symbolic (or hard) links (like rsync)?

I'm searching a tool or a shell script or another program to synchronize two or more folders or disks. But it differs of rsync tool, because, I don't want to duplicate the missing file, but do a ...
2
votes
1answer
54 views

What happen if accidentally move a soft link followed by “/”?

I created a soft link to the current directory, $ ln -s "$PWD" math I then wanted to move it to another directory. $ mv math/ ~/dirlinks/maths/ I then realized I should $ mv math ...
2
votes
1answer
83 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 -> ...
2
votes
1answer
412 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
1answer
1k views

Using symbolic link on directory with contents

I'm working on a Debian machine with a bunch of different filesystems and I'm trying to manipulate a large amount of data in MySQL. I've run out of room in my home directory, but there's a ton of ...
2
votes
1answer
1k views

Exclude symbolic links to other filesystems with find -mount

I am working on a script that, among other things, extracts a list of all items in a directory (files and subdirs) for archival but it needs to skip remote symlinks (i.e. on other file systems). The ...
2
votes
1answer
319 views

Directory sync across SSHFS involving symlinks

I have 2 Ubuntu Linux boxes with similar directory structures, LX02 and LX04. When I ssh from a terminal on LX02 to LX04 and go to my main scripting directory, /root/sbin, I see a different set of ...