Questions tagged [symlink-traversal]

46 questions
2
votes
1 answer

perl symlink immediate target

I am looking for simple & proper way to obtain absolute path of symlink's immediate target (not final target), in perl. My Example Tree: |-- dir1 | |-- link1 -> ../dir2/link2 |-- dir2 | `-- link2 -> ../dir3/file.txt |-- dir3 | `-- file.txt `--…
Mohan
  • 141
  • 3
  • 13
2
votes
2 answers

Is there a way to determine the destination path of a symlink in node?

Situation I just ran into an odd situation that should not happen often, but I would like to prevent it from ever happening again. I have a chunk of code that creates a deep dive directory list of all the files in a source folder and all of its…
Intervalia
  • 10,248
  • 2
  • 30
  • 60
2
votes
2 answers

Backing up symlinks using AWS s3 sync

I'm attempting to backup our system using the aws s3 sync command, however this will either backup the entire directory behind a symlink (default behaviour), or not backup the symlink at all. I'd like some way of backing up the symlink so it can be…
2
votes
3 answers

"tracing" version of readlink(1)

I would like a version of "readlink -f" that provides a trace of every individual symlink resolution it performs. Something like: $ linktrace /usr/lib64/sendmail /usr/lib64 -> lib /usr/lib/sendmail -> ../sbin/sendmail /usr/sbin/sendmail $ I know…
jonrock
  • 129
  • 2
  • 6
2
votes
0 answers

Eclipse CDT indexer won't follow symlinks?

In my source folders, I have two alternate versions of some part of my code, with a symlink choosing which one will be built. Now, in Eclipse, I use a resource filter to not see the two originals and only be able to see the symlink. However, for…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

How to determine if a linux symbolic link points to a directory or a file

I have a directory that has symbolic links - some of them point to files and some of them to directories - how do I identify the ones poiting to directory in a shell script ( without any prejudice to names offcourse)
Yogesh Devi
  • 617
  • 11
  • 30
2
votes
1 answer

Are there any problems with this symlink traversal code for Windows?

In my efforts to resolve Python issue 1578269, I've been working on trying to resolve the target of a symlink in a robust way. I started by using GetFinalPathNameByHandle as recommended here on stackoverflow and by Microsoft, but it turns out that…
Jason R. Coombs
  • 41,115
  • 10
  • 83
  • 93
2
votes
1 answer

Why can't Safari connect to localhost?

I have a proper /etc/hosts file with the following contents: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost When I try to access a server I have running on my local computer, whether it is…
Terry Roe
  • 1,134
  • 10
  • 15
1
vote
1 answer

Traversing multiple symbolic links recursively in Python

I want to write a recursive function to traverse symbolic links from source path to destination path Example: 1)readlink patha/pathb/pathc -> gives if symbolic link exists 2)readlink patha/pathb/pathc/ -> gives if symbolic link exists I'm using…
Somu
  • 15
  • 4
1
vote
1 answer

Resolving symlinks in lua

I tried googling, but I found only additional packages handling this (which I would like to avoid for various reasons). In Lua5.3, is there some way to resolve a symlink, possibly recursively, using just the standard library? I'm looking for…
ZioByte
  • 2,690
  • 1
  • 32
  • 68
1
vote
1 answer

How do I checkout then copy to all files at the destination of a symlink at once?

Background I am following some instructions from a teammate. These instructions include a command to checkout, then copy .a files from a make command from one vob to another. The commands were given to me as such: ct co -nc -unr…
isakbob
  • 1,439
  • 2
  • 17
  • 39
1
vote
0 answers

Disable symlink and mount path resolve in Mac

In mac (el captain), when a file is selected by browsing through a symlink path that points to network or mount point, and you show the file info, then the network path or device path is retrieved instead. example: if /nas is a symlink to…
1
vote
0 answers

Symlink/link in project directory

I've got a project directory that's become a bit of a mess, and I'm trying to tidy it up into a structure something like this: /data /raw /cleaning_scripts /analysis ... Some of the raw data is kept in a directory outside the project…
Empiromancer
  • 3,778
  • 1
  • 22
  • 53
1
vote
1 answer

Do CMake's find_ commands traverse symlinks?

I'm writing a Find.cmake module, because no good one exists for the library in question. This necessitates usage of the find_path and find_library commands. I'm testing it on macOS El Capitan. Through means that are not relevant to this…
JesseTG
  • 2,025
  • 1
  • 24
  • 48
1
vote
2 answers

Is there a way in PHP to check if a directory is a symlink?

I have symlinks to certain directories because the directories' names have non English characters that I got fed up trying to get apache's rewrite rules to match. There's a bounty on that question trouble with utf-8 chars & apache2 rewrite rules…
Colleen Kitchen
  • 1,069
  • 1
  • 11
  • 20