Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ln(1) [v7 man page]

LN(1)							      General Commands Manual							     LN(1)

NAME
ln - make a link SYNOPSIS
ln name1 [ name2 ] DESCRIPTION
A link is a directory entry referring to a file; the same file (together with its size, all its protection information, etc.) may have several links to it. There is no way to distinguish a link to a file from its original directory entry; any changes in the file are effec- tive independently of the name by which the file is known. Ln creates a link to an existing file name1. If name2 is given, the link has that name; otherwise it is placed in the current directory and its name is the last component of name1. It is forbidden to link to a directory or to link across file systems. SEE ALSO
rm(1) LN(1)

Check Out this Related Man Page

SYMLINK(2)							System Calls Manual							SYMLINK(2)

NAME
symlink - make symbolic link to a file SYNOPSIS
symlink(name1, name2) char *name1, *name2; DESCRIPTION
A symbolic link name2 is created to name1 (name2 is the name of the file created, name1 is the string used in creating the symbolic link). Either name may be an arbitrary path name; the files need not be on the same file system. RETURN VALUE
Upon successful completion, a zero value is returned. If an error occurs, the error code is stored in errno and a -1 value is returned. ERRORS
The symbolic link is made unless on or more of the following are true: [ENOTDIR] A component of the name2 prefix is not a directory. [EINVAL] Either name1 or name2 contains a character with the high-order bit set. [ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. [ENOENT] The named file does not exist. [EACCES] A component of the name2 path prefix denies search permission. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EEXIST] Name2 already exists. [EIO] An I/O error occurred while making the directory entry for name2, or allocating the inode for name2, or writing out the link contents of name2. [EROFS] The file name2 would reside on a read-only file system. [ENOSPC] The directory in which the entry for the new symbolic link is being placed cannot be extended because there is no space left on the file system containing the directory. [ENOSPC] The new symbolic link cannot be created because there there is no space left on the file system that will contain the sym- bolic link. [ENOSPC] There are no free inodes on the file system on which the symbolic link is being created. [EDQUOT] The directory in which the entry for the new symbolic link is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted. [EDQUOT] The new symbolic link cannot be created because the user's quota of disk blocks on the file system that will contain the symbolic link has been exhausted. [EDQUOT] The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. [EIO] An I/O error occurred while making the directory entry or allocating the inode. [EFAULT] Name1 or name2 points outside the process's allocated address space. SEE ALSO
link(2), ln(1), unlink(2) 4.2 Berkeley Distribution August 26, 1985 SYMLINK(2)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Telnet and file Copy/Delete Problem

Hi there....I'm new for the UNIX... just wondering if there is any method that can telnet to a server without typing the userID and PWD each time... that is any command or scripts that allows me to enter the server directly? also...after i enter the server... i want to get some files then... (17 Replies)
Discussion started by: biglemon
17 Replies

2. UNIX for Dummies Questions & Answers

changing the telnet banner

I don't want SunOS 5.8 to appear when someone logs into my machine... how do I go about changing the banner? I was thumbing through my unix books and I haven't found anything... I'm probably looking under the wrong topic... anyways... any help would be greatly appreciated. (20 Replies)
Discussion started by: xyyz
20 Replies

3. UNIX for Dummies Questions & Answers

FTP/TELNET on linux, not working

I'm trying to ftp to my linux box from windows and from unix and its not working. I can telnet just fine, but ftp doesn't work. Where should I start looking? What config file is it that controls the ftp? Why does telnet work and ftp not? I'm using redhat 6.1, samba's working for browsing the... (33 Replies)
Discussion started by: kymberm
33 Replies

4. SuSE

How to setup basic telnet?

hey, I was wondering if anybody could help me setup my telnet on my linux 7.1 machine. I need it so i can do some remote work on soem stuff i've got going when i go away next month. I've tried a few times before but it didn't work, i don't know why. thanks for your help. (23 Replies)
Discussion started by: byblyk
23 Replies

5. UNIX for Dummies Questions & Answers

Whats Telnet for?

All i no about telnet is that hackers use it, and it uses shells etc but when i dont even know what a shell is im kinda stuck ah? (16 Replies)
Discussion started by: epic.admin
16 Replies

6. Ubuntu

fail to telnet localhost 106

Hi folks, Ubuntu 7.04 server amd64 On running; $ telnet localhost 106 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused $ netstat -an | grep 106 $ sudo netstat -an | grep 106 both no printout Pls advise where shall I check and how to fix... (22 Replies)
Discussion started by: satimis
22 Replies

7. Linux

fail to telnet localhost 106

(22 Replies)
Discussion started by: satimis
22 Replies

8. Red Hat

"Bus error" when telnet...

Hi, On one PC I cannot do telnet due to "Bus error". What could cause this? telnet Bus error telnet port is open: tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 10584/xinetd # cat /etc/xinetd.d/telnet # default: on # description: The... (21 Replies)
Discussion started by: cpcpc
21 Replies

9. UNIX for Dummies Questions & Answers

Telnet Problem

I have a problem where on one unix machine I can telnet all IP addresses in the host file with no connection problem and another machine has recently started to have trouble connecting with the same host IP's on just some IP addresses where it had no trouble before. Have any ideas?? (17 Replies)
Discussion started by: tazzy
17 Replies

10. AIX

Problems with SSH / telnet

Hey, I have upgraded 3 servers from SSH Tectia 4.0.3 to SSH Tectia 6.0.2. 2 of them are working fine but one server suddenly began to have troubles after about 2 hours. Now it is impossible to login to this server using SSH and even telnet. When SSH is running on this particular server, the CPU... (20 Replies)
Discussion started by: Hille
20 Replies

11. Shell Programming and Scripting

How to Create a shell script to test the telnet connection status

Hi friends, I'm newbie to shell script. I wanted to create a shell script which able to write a result for all the telnet connection status. For example, from this machine I want to test the telnet connection (total 100+ servers) with this machine. Any idea how to write this shell script?... (16 Replies)
Discussion started by: yhcheong
16 Replies

12. Solaris

Failure to telnet in new install Sun5.10

Hi, I telnet to the localost in new install Sun 5.10 I get below error I also telnet from other to this mahcine but get "access deny" after input root password. The password is correct as I can login in console "Not on system console connection to unknown cloase by foregin host" Why ,... (25 Replies)
Discussion started by: chuikingman
25 Replies

13. HP-UX

Enable telnet as root to 11.31 non-trusted system?

I have a new box that was set up for me and I want to allow telnet to the box as root. I know that it's not secure but due to the nature of what I test I need an easy and reliable way back in if I've messed up the other connection methods(SSH). This is in a protected lab environment. Eventually... (17 Replies)
Discussion started by: gctaylor
17 Replies

14. Shell Programming and Scripting

Telnet script to amplifier

Hi all! I have a Pioneer VSX-921 which I am very happy about. It has airplay, lots of other features. One of them is controlling it with your Iphone and telnet. And now it becomes interesting! I want to make a bash script to log into my amp, send a command: MZ (which means mute) and then exit... (29 Replies)
Discussion started by: drogert
29 Replies

15. SCO

Telnet session disconnects abruptly

I have inherited and SCO OpenServer Release 6 server. The clients connect using telnet to get to a proprietary database application for Service tickets. The issue I am currently having is that the connection just stops abruptly and you can see "telnet session terminated" on the terminal emulation... (22 Replies)
Discussion started by: sean6605
22 Replies