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

learn more… | top users | synonyms (1)

2
votes
0answers
270 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 ...
1
vote
1answer
52 views

is there some kind of symbolic links that support moving or renaming the target file?

I liked this explanation of hard and soft/symbolic links: http://unix.stackexchange.com/a/22406/42226 Now the reason why I googled about soft and hard links is simply because I was organizing my ...
1
vote
2answers
2k views

cannot create symbolic link on CentOS 5.6 - File exists error

I am trying to setup a symbolic link on my CentOS 5.6 machine to point dev_crmpicco/ to ~/vhosts/dev/dev_crmpicco/web/ I am using the following command: [crmpicco@devel dev]$ ln -s ...
2
votes
1answer
589 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 ...
1
vote
1answer
215 views

Symlink Copy a Directory Non-recursively

So I want to symlink copy all the files and folders in one directory to another directory. When I use cp -s though without the -r option I get a bunch of "omitting directory" warnings, and I don't ...
21
votes
2answers
1k views

Symbolic link recursion - what makes it “reset”?

I wrote a little bash script to see what happens when I keep following a symbolic link that points to the same directory. I was expecting it to either make a very long working directory, or to crash. ...
4
votes
2answers
224 views

cd to directory of a symbolically linked file

Before I write a script, anyone know an easy way to do the following: $ pwd /foo/bar $ ls -l lrwxr-xr-x 1 username admin 48 Apr 17 2012 foo.sh -> /bar/foo.sh $ cd /bar $ ls foo.sh i.e., in ...
0
votes
1answer
74 views

How to prevent find -execdir from following symlinks?

Say I have a symlink: linktob -> b If I run something like find . -type l -execdir chmod 777 {} \;, the chmod command affects the file the symlink is pointing to, i.e. ‘b’. The man page suggests ...
3
votes
1answer
321 views

How can I efficiently dereference all symlinks in `find` *output* filenames?

I need paths to be both fully resolved and relative to a given directory. This must be done efficiently, since the number of paths is often greater than 100,000. Situation: I have directories which ...
3
votes
2answers
221 views

How Do I Block Read Access to a Symbolic Link?

I have this file structure: > APPLICATION 1 >> CONTROLLER (@JuniorProgrammers) >> MODELS (symlink to SHARED/MODELS) >> VIEWS (@Designers) > APPLICATION 2 >> CONTROLLER ...
14
votes
1answer
1k views

What does ln stand for?

In Linux you can use the ln command to make links. $ touch foo $ ln -s foo foo_link $ ls -l lrwxrwxrwx 1 cklein cklein 3 May 29 16:11 foo_link -> foo I assume that the 'l' in ln stands ...
2
votes
1answer
210 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 ...
14
votes
1answer
2k views

Why are reboot, shutdown and poweroff symlinks to systemctl?

In Arch Linux, if I do ls -l in /sbin, I can see that reboot, shutdown and poweroff are all symlinks to /usr/bin/systemctl. But issuing reboot, shutdown and systemctl commands obviously does not all ...
8
votes
5answers
838 views

Portable way to get script's absolute path?

What is a portable way for a (zsh) script to determine its absolute path? On Linux I use something like mypath=$(readlink -f $0) ...but this is not portable. (E.g., readlink on darwin does not ...
1
vote
1answer
821 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. ...
0
votes
1answer
293 views

Opera, Firefox has no kiosk option like Chrome gives it openly?

While using Chrome kiosk mode, i have problem with openbox desktop, its not doing correct for some javascript rendering. So i wanted to test opera and firefox but both does not support kiosk at all ...
4
votes
1answer
184 views

Can I create a symlink that will ignore subdirectories?

I'm trying to get dropbox symlinked to the relevant folders in /home. I'd like to symlink them like this: ~/Dropbox/Pictures --> ~/Pictures ~/Dropbox/Camera Uploads --> ~/Pictures/Camera ...
0
votes
2answers
153 views

How do I copy directories and symlink files?

I have got a directory of huge files (total ~ 1TB) and I don't want copy them around. However, I'd like to work around them, so it would be convenient to have them linked in a directory hierarchy I ...
1
vote
1answer
87 views

Pre-specifying a default GNU Stow target-directory

TLDR: Can I pre-define a stow folder other than /usr/local with GNU Stow? I do not have admin privileges on the machine I use for work, and I was told that I could use GNU Stow to manage my ...
2
votes
3answers
175 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 ...
0
votes
0answers
448 views

make: i686-linux-gcc: Command not found

I am using Ubuntu-11.10 amd64 and trying to cross-compile a linux-2.6.38.8 kernel for a 32-bit target.I tried make CROSS_COMPILE=i686-linux- ARCH=i386 But I got error make: i686-linux-gcc: ...
0
votes
1answer
522 views

Using grep with symbolic link

I don't know how to ask this, but let me explain. I have a text file (named bla) in my ~/user/Dropbox folder. I would like to grep on it from any folder in terminal. For example, I'd like just type ...
3
votes
0answers
248 views

Using symbolic links and git to manage build versions

In general I follow the following workflow when I build any program (e.g. emacs, tmux, etc.) /home/opt/[name of the program]/builds/[version]/ bin lib share For example for a program like tmux I ...
0
votes
2answers
1k views

Remove soft link but not the target

I have a directory that contains a link to another directory that I just created. I would like to remove the link but preserve the directory my link was pointing to. How do I do this? > mkdir rgac ...
3
votes
3answers
167 views

Creating a local workspace for development/testing

I want to be able to mount, say /home/$USER/workspace to /usr/local/workspace. Right now I'm using the python package pyfilesystem which uses fuse to do that. My problem is, that inside that mount I ...
2
votes
0answers
321 views

Multiple Linux or Unix Distributions, Same Home Partition or Data?

To avoid conflicts I have always installed multiple Linux and Unix distributions each with it's own home partion or directory, and in the era of 3TB hard drives this is often very practical; I also do ...
4
votes
3answers
816 views

Create symbolic links to files using wildcards

I want to create symlinks to multiple files: ln -s dev-*.php 's/dev-(.*\.php)/$1/' Results hoped for: site.php links to dev-site.php file.php links to dev-file.php What's the most ...
5
votes
4answers
2k views

Changing the timestamp of a symlink

I know how to change the timestamp of a regular file: touch -t 201301291810 myfile.txt I was not able to do the same with a symlink. Is it possible? Distro: RHEL 5.8
2
votes
1answer
782 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 ...
3
votes
2answers
692 views

Resolving symbolic links (pwd)

Say I do the following: cd /some/path ln -s /target/path symbolic_name If then do: cd /some/path cd symbolic_name pwd I get: /some/path/symblic_name and not: /target/path Is there a way to ...
4
votes
1answer
2k views

Does Windows recognize Linux's symbolic links?

I was just wondering how a Windows system handles symbolic links. My best guess is that it will not recognize them, but I'm not entirely sure. Also, what do Macs do when confronted by one?
2
votes
1answer
719 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 ...
3
votes
1answer
286 views

rsync: how to relocate absolute symlinks?

I've pored over the rsync manpage as well as on several related questions here on serverfault. I've played with -R and -L and -l options, but no luck. Here is the question: when sending a dir from ...
3
votes
2answers
968 views

How could I make multiple symbolic links for multiple directories, conveniently

lrwxrwxrwx 1 deploy users 20 1월 23 18:15 v122 -> /home/files/video122 lrwxrwxrwx 1 deploy users 20 1월 23 18:15 v123 -> /home/files/video123 lrwxrwxrwx 1 deploy users 20 1월 23 ...
1
vote
1answer
765 views

How to copy symbolic links while preserving the validity of the link?

Say under directory /usr/local/boost_1_52_0/stage/lib, I have a symbolic link: libboost_timer.so, which points to the regular file libboost_timer.so.1.52.0 in the same directory. How can I cp the ...
3
votes
1answer
95 views

Symbolic link starting with .#

I have a symlink in one of my directories that has the following name: lrwxrwxrwx 1 XXXX ZZZ 37 Jan 15 18:18 .#perl.org -> XXX@YYY.com.2980:1344441539 I am wondering what this symlink ...
4
votes
1answer
187 views

How do I cd up and down again with symlinks in bash?

Structure: /base/ +- somedir/ +- symlink/ -> /some_other_dir This command (in addition to my Makefiles) fails: cd /base/symlink ls ../somedir Bash complains that ../somedir does not ...
4
votes
2answers
385 views

Can we use symbolic link and hard link for directories?

I know we can do that for files. What about directories? It seems that cpanel uses that a lot.
4
votes
2answers
815 views

Syncing multiple home folders with dropbox and symlinks

To keep multiple computers synced with dropbox I tried the following. Approach A. -Computer 1: Install dropbox, dropbox folder: /Dropbox/ -Computer 1: Create symbolic link in that folder to home ...
4
votes
1answer
103 views

How do I batch-export all the content contained in symbolic links? (and then delete them all)

So as an alternative to Recursive scp without following links or creating a giant tar file? (this could be an emergency since the remote files could be deleted any time soon), I'm thinking of deleting ...
2
votes
2answers
3k 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... ...
3
votes
3answers
312 views

How to diff two folders by inodes

I'm currently using a script to backup files on my computer. In a nutshell, it works like this: rsync --link-dest=$FOLDER/current $SOURCE $DESTINATION However, I think that my script may be ...
0
votes
1answer
211 views

pwd resolving symbolic links [duplicate]

Possible Duplicate: pwd without symlinks Imagine I have a directory /home/me/dir and a symbolic link to it called /home/me/dirlink now if I enter dirlink and use pwd, it of course ...
7
votes
4answers
607 views

Linking /proc/mnt to /proc/mounts

I understand that /proc filesystem reflects the output of various processes. Unfortunately, I have a propietary (romdump) binary that expects the mount table to appear as /proc/mtd, while my Android ...
1
vote
1answer
167 views

tomcat: symbolic link in a loop

linux-trra:/usr/local> $CATALINA_HOME bash: /home/anisha/openGTS17Nov/apache-tomcat-7.0.32/: is a directory linux-trra:/usr/local # ln -s $CATALINA_HOME tomcat linux-trra:/usr/local # file tomcat ...
1
vote
2answers
84 views

Create a link but don't change the canonical path

In each users' directory there exists a symbolic link to /var/www/website/public_html/. However, whenever a user cds into the link, he sees the path as /home/username/public_html/. Is there any way to ...
5
votes
3answers
214 views

How to ls using the long format (-l) while still following directory symlinks?

I've noticed that ls -l doesn't only change the formatting of the output, but also how directory symlinks are handled: > ls /rmn biweekly.sh daily.sh logs ... > ls -l /rmn lrwxrwxrwx 1 root ...
5
votes
2answers
7k views

How do I copy a symbolic link?

I have a symbolic link to a file in one directory. I would like to have that same link in another directory. How do I copy a symbolic link? I tried to cp the symbolic link but this copies the file ...
2
votes
1answer
285 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 ...
12
votes
1answer
4k views

Make cd follow symbolic links

I have my code mounted as an sshfs in my home directory, but the hierarchy is difficult to remember, so I created a symlink in my home directory leading to that directory. Is there a way so that when ...