
/home/jcubic/www/shell/config.json
wwwがシンボリックリンクであるファイルへのパスがあります。ここでパスを取得/domains/jcubic.pl/public_html
できますか?/home/jcubic/domains/jcubic.pl/public_html/shell/config.json
/home/jcubic/www/shell/config.json
答え1
realpath
または、readlink
コマンドを使用してシンボリックリンクに従うこともできます。
realpath /home/jcubic/www/shell/config.json
readlink -f /home/jcubic/www/shell/config.json
または、-m
リンクが壊れているがまだ結果が必要な場合に使用してください。