ln

å称
     ln, link — ãªã³ã¯ãã¡ã¤ã«ã®ä½æ

æ¸å¼
     ln [-fhinsv] source_file [target_file] ln [-fhinsv] source_file ...
     target_dir link source_file target_file

解説
     ln ã¯æ°ãããã£ã¬ã¯ããªã¨ã³ã㪠(ãªã³ã¯ãã¡ã¤ã«) ãä½æããã¦ã¼ãã£ãªãã£ã§ãã
     ãªã³ã¯ãã¡ã¤ã«ã®ã¢ã¼ãã¯ãªãªã¸ãã«ãã¡ã¤ã«ã¨åãã«ãªãã¾ãã ãªã³ã¯ãã¡ã¤ã«ã¯
     “ãã¡ã¤ã«ã®å容ã®ã³ãã¼” ã§ã¯ãªãã “ãã¡ã¤ã«ãæã示ããã¤ã³ã¿” ã§ããã1
     ã¤ã®ãªãªã¸ãã« ãã¡ã¤ã«ãå¤ãã®ãã£ã¬ã¯ããªã§åãæ±ããããã«ããã®ã«æå¹ã§ãã
     ãªã³ã¯ãã¡ã¤ã«ã«ã¯ããã¼ããªã³ã¯ã¨ã·ã³ããªãã¯ãªã³ã¯ã® 2 ã¤ã®å½¢å¼ããã
     ã¾ããéãã¯ããªã³ã¯ã®æ¹æ³ã§ãã

     ãªãã·ã§ã³ã¨ãã¦ã¯ä»¥ä¸ã®ãã®ãããã¾ãã

     -f    target_file ãæ¢ã«åå¨ããå ´åã ãªã³ã¯ãæåããããã«ããããã¢ã³ãªã³ã¯ãã¾ãã ( -f
           ãªãã·ã§ã³ãæå®ãããã¨ããã以åã® -i ãªãã·ã§ã³ã¯ç¡è¦ããã¾ãã)

     -h    target_file ã¾ã㯠target_dir ãã·ã³ããªãã¯ãªã³ã¯ã®å ´åãããã辿ãã¾ããã
           ããã¯ã -f ãªãã·ã§ã³ã¨å±ã«ä½¿ç¨ãã¦ã
           ãã£ã¬ã¯ããªãæããããããªãã·ã³ããªãã¯ãªã³ã¯ãç½®ãæããå ´åã« æãæç¨ã§ãã

     -i    ãã§ã« target_file ãåå¨ããå ´åã ln
           ã«æ¨æºã¨ã©ã¼åºåã使ç¨ãã¦ç¢ºèªãæ±ãããã¾ãã æ¨æºå¥åãã ‘y’ ã¾ã㯠‘Y’
           ã§å§ã¾ãæååãå¥åãããã¨ãtarget_file ãæ¢ã«åå¨ããå ´åã
           ãªã³ã¯ãæåããããã«ããããã¢ã³ãªã³ã¯ãã¾ãã ( -i ãªãã·ã§ã³ãæå®ãããã¨ããã以åã®
           -f ãªãã·ã§ã³ã¯ç¡è¦ããã¾ãã)

     -n    -h ã¨åæ§ã§ãããä»ã® ln ã®å®è£ã¨ã®äºææ§ã®ããã«ããã¾ãã

     -s    ã·ã³ããªãã¯ãªã³ã¯ãä½æãã¾ãã

     -v    ln ãåé·ã«ããå¦çãããã¡ã¤ã«ã表示ãã¾ãã

     ããã©ã«ãã§ã¯ã ln 㯠ãã¼ããªã³ã¯ ãä½æãã¾ãã
     ãã¡ã¤ã«ã¸ã®ãã¼ããªã³ã¯ã¯ãªãªã¸ãã«ã®ãã£ã¬ã¯ããªã¨ã³ããªã¨åºå¥ã§ãã¾ããã
     ãã¡ã¤ã«ã®åç§ã«ä½¿ãããååã«ãããããã ãã®ãã¡ã¤ã«ã¸ã®ãããªãä¿®æ£ãåãããã«æå¹ã§ãã
     é常ããã¼ããªã³ã¯ã¯ãã£ã¬ã¯ããªãæããã¨ã¯ã§ãã¾ãããã
     ãã¡ã¤ã«ã·ã¹ãã ãæ¡å¼µãããã¨ãã§ãã¾ããã

     ã·ã³ããªãã¯ãªã³ã¯ã¯ãªã³ã¯åãã¡ã¤ã«ã®ååãä¿æãã¾ãã ãªã³ã¯ã«å¯¾ã㦠open(2)
     æä½ãè¡ãã¨ããã®åç§åãã¡ã¤ã«ãç¨ãããã¾ãã ã·ã³ããªãã¯ãªã³ã¯ã«å¯¾ã㦠stat(2)
     æä½ãè¡ãã¨ãåç§åãã¡ã¤ã«ã®æå ±ãè¿ãã¾ãã ãªã³ã¯ãã®ãã®ã®æå ±ãå¾ãã«ã¯ lstat(2)
     ãç¨ããªããã°ãªãã¾ããã readlink(2) å¼ã³åºãã«ãã£ã¦ã·ã³ããªãã¯ãªã³ã¯ã®å容ãèª‐
     ããã¨ãã§ãã¾ãã ã·ã³ããªãã¯ãªã³ã¯ã«ãã£ã¦ãã¡ã¤ã«ã·ã¹ãã ãæ¡å¼µãããã
     ãã£ã¬ã¯ããªãåç§ããããããã¨ãå¯è½ã§ãã

     1 åããã㯠2 åã®å¼æ°ãä¸ããããå ´åã ln ã¯æ¢åã®ãã¡ã¤ã« source_file
     ã«å¯¾ãããªã³ã¯ãä½æãã¾ãã target_file
     ãæå®ãããå ´åããªã³ã¯ã®ååã¯ããã¨åä¸ã«ãªãã¾ãã target_file
     ã¯ãªã³ã¯ãã¡ã¤ã«ãç½®ããã£ã¬ã¯ããªã§ãã£ã¦ãæ§ãã¾ããã
     ãã以å¤ã®å ´åã¯ãªã³ã¯ã¯ã«ã¬ã³ããã£ã¬ã¯ããªã«ç½®ããã¾ãã
     ãã£ã¬ã¯ããªåã ããæå®ãããå ´åã¯ã source_file
     ã®ãã¹åã®æå¾ã®ãã¡ã¤ã«åãæå®ããããã®ã¨ã¿ãªãã¾ãã

     2 å以ä¸ã®å¼æ°ãä¸ããããå ´åã ln ã¯ãã£ã¬ã¯ã㪠target_file
     åã«æå®ãããå¨ã¦ã®ãã¡ã¤ã«ã®ãªã³ã¯ãä½æãã¾ããä½ããããªã³ã¯ã®
     ååã¯ããªã³ã¯ããããã¡ã¤ã«ã®ååã¨åãã«ãªãã¾ãã

     æ¬ã¦ã¼ãã£ãªãã£ã link ã¨ãã¦å¼ã³åºãå ´åãæ£ç¢ºã« 2 åã®å¼æ°ãå¿è¦ã§ããã
     ã©ã¡ãããã£ã¬ã¯ããªã§ãã£ã¦ã¯ãªãã¾ããã
     ãã®åç´ã¢ã¼ãã§ã¯ããªãã·ã§ã³ã¯æå®ä¸å¯ã§ããã渡ããã 2 åã®å¼æ°ã使ç¨ã㦠link(2)
     ã®åä½ãè¡ãã¾ãã

é¢é£é ç®
     link(2), lstat(2), readlink(2), stat(2), symlink(2), symlink(7)

äºææ§
     -h, -i, -n, -v ã¯æ¨æºã§ã¯ããã¾ããããã¹ã¯ãªããä¸ã§ã®ä½¿ç¨ã¯ãå§ããã¾ããã ä»ã® ln
     å®è£ã¨ã®äºææ§ã®ããã ãã«æä¾ããã¦ãã¾ãã

è¦æ ¼
     ln ã¦ã¼ãã£ãªãã£ã¯ IEEE Std 1003.2-1992 (“POSIX.2”) ã«é©åãã¾ãã åç´åããã
     link ã³ãã³ã㯠Version 2 of the Single UNIX Specification (“SUSv2”)
     ã«é©åãã¾ãã

æ´å²
     ln ã³ãã³ã㯠Version 1 AT&T UNIX ããç»å ´ãã¾ããã