Questions tagged [symlink-traversal]
46 questions
1
vote
2 answers
Efficient way to walk directory tree containing link cycles
Is there a more efficient way to walk a directory tree that contains link cycles than tracking which files have already been visited?
For example consider walking a directory containing these files:
symlink "parent" -> ".."
symlink "uh_oh" ->…

Matt Joiner
- 112,946
- 110
- 377
- 526
1
vote
0 answers
How to use symlinks with PHP and Nginx (or Lighttpd)?
I've installed Nginx + FPM-PHP under Debian and ArchLinux. Both are working fine. However, I can't figure out how to get the PHP part to follow symlinks. I've also tried with Lighttpd, but to no avail.
Here is what I want to do:
Root directory…

Luis Soeiro
- 4,262
- 6
- 35
- 45
1
vote
2 answers
Resolving all symbolic links in NSURL
I'm writing a little piece of code in which I should detect if an NSURL contains a symbolic link (i.e., symbolic file components other than the last one should also be detected). To do this, I confront the NSURL itself with the NSURL returned by…

Nickkk
- 2,261
- 1
- 25
- 34
0
votes
1 answer
How do i get the following code to recognize a symlink?
#!/usr/bin/env python3.2
import os
import sys
fileList = []
rootdir = sys.argv[1]
for subdir, dirs, files in os.walk(rootdir, followlinks=True):
for file in files:
f = os.path.join(subdir,file)
if os.path.islink(file):
…

RashMans
- 321
- 1
- 4
- 17
0
votes
1 answer
How do you list all symlinks in a directory that has non-hanging links?
I would like to get a list of all symlinks within a directory that has valid links. In other words, I would like all the broken links to be discarded in my list.

pmohandas
- 3,669
- 2
- 23
- 25
0
votes
0 answers
Symlinks not working from Explorer but work fine from cmd shell
I'm seeing a weird behaviour for one user in a network. They cannot follow some symlinks we have configured on the file server.
If I open a command shell I can open the symlinked folder without problems. I can also cd into the folder and everything…

Ian
- 257
- 1
- 2
- 11
0
votes
1 answer
How to create a symbolic link or hard link to another symbolic link?
For example, I create a link ln -s /mytarget /mylink (where mytarget is a directory). Now I would like to create a link to /mylink, i.e., ln -s /mylink /mylinkother. The first link mylink works fine, but the second link mylinkother does not…

Evandro Coan
- 8,560
- 11
- 83
- 144
0
votes
1 answer
Bash Script Not allowing special symbols in zipping a file
I am actually creating a zip file based on a pdf file that I have downloaded through java code, so the problem statement is like this.
I have a pdf file with special symbols = (wallbay)+1-50 m+ ipad+i pho ne%watch.pdf
Now I want this file to be…

Rajesh Kumar
- 13
- 4
0
votes
0 answers
Cygwin: follow symlinks with MinGW fopen/etc
Problem: I'm writing some code that is portable to Linux and Cygwin (compiled on msys), and the handling of symlinks is different. On Cygwin, if I create a symlink in the normal way, with a default Cygwin shell (ie. the CYGWIN envvar not set):
$ ln…

QF0
- 329
- 2
- 14
0
votes
0 answers
How to create symlinks in laravel for a directory to a external link
I want to create symlinks for my laravel site media link from
`/public/uploads/*` to a link `abc.com/public/uploads/*`
For example,
I have a site abc.com
There an image with media url :
abc.com/apple.jpg
And i have s3 spaces where
My apple.jpg…

Anonymous Girl
- 582
- 8
- 22
0
votes
0 answers
Create symlinks for directories that don't exist - Windows
I got this as my main directory.
└───etc_core
└───modules_core
├───core_module_1
├───core_module_2
└───core_module_3
I got another directory with the same structure, but with different modules.
└───etc_custom
…

Ravenous
- 1,112
- 11
- 25
0
votes
1 answer
Windows command line dectect if there is SymLink folder in path
There are here a few solutions to detect if a given folder is a Symbolic Link...
but how to detect if one of the folders in path is a SymLink...
not only the immediate parent...
but any ancestor folder ???
for example, in the…

ZEE
- 2,931
- 5
- 35
- 47
0
votes
1 answer
How to move up a level from an symbolic link in OSX
I've created a symbolic link to my WordPress theme root from my system root - so in / I have
mytheme -> /Applications/MAMP/htdocs-wordpress/wp-content/themes/mytheme
I use this all the time to quickly get to my theme root in Terminal. But I very…

And Finally
- 5,602
- 14
- 70
- 110
0
votes
2 answers
How to make Mercurial detect changes made to the target of a symlink
I have a project version-controlled by the Mercurial (project main). The project references (uses) some files from another project (sub) by a symbolic link in the main pointing to a file in sub. The symbolic link is added to the main's…

mbaitoff
- 8,831
- 4
- 24
- 32
0
votes
1 answer
Traverse subdirectores and symlink certain files (but not all)
I have following directory structure that I pull from github;
dotfiles/bash
.bashrc
.bash_profile
.some_other
env
dotfiles/tmux/
.tmux.conf
dotfiles/???/
.whatever
bash/In my bashcode (below) I'd like to (in my script…

b0red
- 47
- 7