ln.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <html>
  2. <head>
  3. <title>ln</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>ln</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. ln - link files
  9. <h3>Synopsis</h3>
  10. /bin/ln <em>oldfile</em> <em>newfile</em>
  11. <br>
  12. /bin/ln -s <em>oldfile</em> <em>newfile</em>
  13. <h3>Description</h3>
  14. ln creates links to files. The first usage creates a hard link, that
  15. is, an additional name for the <strong>same</strong> file. The second
  16. usage, with the -s option, creates a symbolic link, a special
  17. filesystem entry that redirects accesses back to the first original
  18. file.
  19. <p>
  20. The symlink created is of the form <em>newfile</em> -> <em>oldfile</em>.
  21. <p>
  22. <h3>Requirements</h3>
  23. ln uses the following syscalls:
  24. <ul>
  25. <li><A HREF=../syscall/link.html>link</A>
  26. <li><A HREF=../syscall/symlink.html>symlink</A>
  27. <li><A HREF=../syscall/write.html>write</A>
  28. <li><A HREF=../syscall/_exit.html>_exit</A>
  29. </ul>
  30. ln without the -s option should work once (or if) you implement hard
  31. links. ln with the -s option should work once (or if) you implement
  32. symbolic links. Check your assignments for when (or if) you need to
  33. implement these features.
  34. <p>
  35. ln is able to create symlinks even if hard links are not implemented,
  36. and vice versa.
  37. <h3>See Also</h3>
  38. <A HREF=cp.html>cp</A>, <A HREF=mv.html>mv<A>
  39. </body>
  40. </html>