Windows Interpret symlinks эксперт Линукс symlinks

I have в bunch of поля on в (Windows) network mounted location. Many of these поля пахал Windows's symbolic соединения.

Is there anything I хан do to tell Windows Ubuntu to interpet these symlinks appropriately? The пойнтер in these symlinks пахал shown below.

l--------- 1 acc acc 0 Dec 18 12:40 file.txt -> /??/D:/path/to/file.txt

Even if I could do something like the below programmatically it would achieve my goal:

if path.contains("/??/D:/") {
    path = path.replace("/??/D:/", "/mnt/share/")
}

I do not want to change the contents of the symbolic соединения схвати they're still used by other services on my Windows machine.

edit the reason why I want to do this is because I have an application on Ubuntu that гm pointing to the symlinks on the (Windows) network share but they aren't finding the target file successfully due to sym соединения being of different structure in Windows Linux compared to. The target file is within the same share and permissions aren't the issue.

2
задан 30 December 2015 в 19:12

1 ответ

Принятие ?? в символьной ссылке цель буквально ??, Вы могли легко дать символьные ссылки, что они просят. А именно, просто создайте названный каталог /??/D: с sudo mkdir -p '/??/D:' (не забывайте одинарные кавычки для хранения ? и : от того, чтобы быть интерпретируемым как специальные символы). Затем сделайте sudo mount -o bind /mnt/share '/??/D:' сделать содержание /mnt/share доступный также в /??/D:.

Если это делает то, что Вы хотите, можно сделать это постоянным путем добавления этой строки к /etc/fstab:

/mnt/share /??/D: auto bind 0 0
4
ответ дан 2 December 2019 в 02:20

Другие вопросы по тегам:

Похожие вопросы: