A special type of file that references a file or directory.
3
votes
3answers
43 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
21 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. ...
-1
votes
0answers
34 views
create a /proc symlink
I'm trying to build a module using the method shown in this answer.
Basically I need to create a symlink I got it to build, when I try to load it using insmod I get:
-1 invalid module format
and ...
7
votes
4answers
301 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 ...
0
votes
1answer
35 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 ...
3
votes
1answer
49 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 ...
4
votes
1answer
54 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
528 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
$ ...
0
votes
2answers
31 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 ...
26
votes
6answers
4k views
How can I find broken symlinks
Is there a way to find all symbolic links that don't point anywere?
find ./ -type l
will give me all symbolic links, but makes no distinction between links that go somewhere and links that don't. ...
3
votes
2answers
81 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 ...
0
votes
1answer
32 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
115 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
108 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
53 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 ...
2
votes
0answers
59 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 ...
2
votes
1answer
163 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 ...
0
votes
2answers
92 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
...
20
votes
3answers
3k views
How can I “relink” a lot of broken symlinks?
I have a directory tree which has a bunch of symbolic links to files under /home... however, I have moved /home to /mnt/home and need a way to "relink" all of the symlinks. Does such functionality ...
0
votes
0answers
137 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
136 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 ...
0
votes
3answers
183 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
2answers
87 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 ...
2
votes
1answer
189 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
80 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 ...
1
vote
1answer
109 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
164 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
173 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 ...
4
votes
1answer
81 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 ...
3
votes
1answer
69 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 ...
3
votes
3answers
149 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 ...
3
votes
1answer
113 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.
3
votes
2answers
501 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 ...
2
votes
2answers
510 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...
...
7
votes
2answers
145 views
Git do not overwrite symlinked directory on branch checkout
How can I make directory read-only with git?
The situation is - in project, I have a symlink to shared framework. I don't want it to be overwritten/changed in any way (not even mtime or atime).
How ...
0
votes
1answer
72 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 ...
1
vote
1answer
126 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
56 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 ...
4
votes
2answers
106 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 ...
3
votes
2answers
873 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
175 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 ...
2
votes
1answer
409 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 ...
4
votes
1answer
361 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
...
2
votes
1answer
143 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. ...
2
votes
1answer
163 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 ...
1
vote
1answer
264 views
Can't delete symbolic links, permission denied
I try to delete all symbolic links pointing to Python3.2 with
sudo ls -l . | grep '../Library/Frameworks/Python.framework/Versions/3.2' | awk '{print $9}' | xargs rm
This just gives
rm: 2to3: ...
4
votes
1answer
110 views
Move a file and re-target all of its symlinks [duplicate]
Possible Duplicate:
How can I “relink” a lot of broken symlinks?
Is there any way to move a file to a new location, and then re-target its symlinks to the new location, using a shell ...
2
votes
1answer
149 views
How do you increase MAXSYMLINKS
In a python script, I am creating a bunch of symbolic links chained together.
example: link1->link2->link3->.......->somefile.txt
I was wondering how you can change the max number of symlinks to be ...
5
votes
2answers
221 views
Find files that were not installed by the package manager
I'd like to get a list of all files in my Gentoo Linux system that were not installed by the package manager (Portage). This is because I want to keep my system as clean as possible, removing all ...
3
votes
2answers
161 views
Why is bash giving me (apparently) conflicting information about a file?
Background
I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1
I asked Bob to give me permission to read all contents of inputs:
[bob@server]$ ...

