Как определить значение символического пути

import os
path = "a/b/c/abc.txt"
print os.path.splitext(os.path.basename(path))[0]
1
задан JustADude 14 June 2009 в 02:23
поделиться

2 ответа

Try:

readlink `which lynx`

which does not follow symbolic links. Instead, it gets only to the symbolic link which got executed. readlink can then follow this symbolic link to the original binary/executable.

2
ответ дан 3 September 2019 в 01:26
поделиться

Also:

 ls -l `which lynx`

which will exhibit the linked path (at least on some lss).

0
ответ дан 3 September 2019 в 01:26
поделиться
Другие вопросы по тегам:

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