home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: lint Chapter 2
UNIX Commands
Next: Reference: login
 

ln



ln

 [

options

] 

file1

 

file2




ln

 [

options

] 

files directory

Create pseudonyms (links) for files, allowing them to be accessed by different names. In the first form, link file1 to file2 , where file2 is usually a new filename. If file2 is an existing file, it is overwritten; if file2 is an existing directory, a link named file1 is created in that directory. In the second form, create links in directory , each link having the same name as the file specified.

Options

-f

Force the link to occur (don't prompt for overwrite permission).

-n

Do not overwrite existing files.

-s

Create a symbolic link. This lets you link across file systems and also see the name of the link when you run ls -l (otherwise there's no way to know the name that a file is linked to).


Previous: Reference: lint UNIX in a Nutshell: System V Edition Next: Reference: login
Reference: lint Book Index Reference: login

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System