LoginSignup
0
1

More than 5 years have passed since last update.

linux command > ( (symbolic linkの) symbolic linkの) オリジナルを探す > readlink -f [シンボリックリンクファイル]

Last updated at Posted at 2017-08-12
動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.1.0
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

Symbolic linkのSymbolic linkをはっていると、オリジナルのファイルがどこのフォルダのどのファイルか分かりにくい。

readlinkを使うようだ。

テストデータ作成

$ touch original
$ ln -fs original kagemusha1
$ ln -fs kagemusha1 decoy_of_decoy

decoy_of_decoy
から
original
を探したいということ。

試用

$ readlink -f decoy_of_decoy 
/home/yasokada/WORK/LINUX/original
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1