LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   create soft link and hard link in RHEL5 (https://www.linuxquestions.org/questions/linux-server-73/create-soft-link-and-hard-link-in-rhel5-830918/)

ramadas88 09-08-2010 02:42 AM

create soft link and hard link in RHEL5
 
hi


how can we create soft link and hard link in RHEL5

when am using in command it is giving format error

Please help me

Thanks in advance

sem007 09-08-2010 03:06 AM

Quote:

Originally Posted by ramadas88 (Post 4091152)
hi


how can we create soft link and hard link in RHEL5

when am using in command it is giving format error

Please help me

Thanks in advance

what command you entered for symbolic(soft) link and hard link? and also post exact error which you faced.

BTW

for softlink

Code:

# ln -s source_file link_file
for hardlink

Code:

# ln source_file link_file
also read man page of ln command

sag47 09-08-2010 03:07 AM

The link command is normally formatted for soft links like:
Code:

ln -s <path to file or folder> <target directory>
For hard links they only work on file paths and data which are located on the same drive. It does not work on folders in all versions of ln or link.
Code:

ln <path of original file> <target file path>
Well you could try "man ln" to see how the command is supposed to be formatted. My link command is located in /bin/ln so you may want to check you're using the correct ln with "whereis ln".

ramadas88 09-10-2010 05:28 AM

thanks for Your replay
Sorry i will update you monday

ramadas88 09-13-2010 01:43 AM

Find the command i used

[root@server ~]# vi test
[root@server ~]# in test test2
bash: syntax error near unexpected token `in'
[root@server ~]# in -s test test2
bash: syntax error near unexpected token `in'
[root@server ~]# in -s test test2

Please help me

basheer 09-13-2010 02:04 AM

Quote:

Originally Posted by ramadas88 (Post 4095770)
Find the command i used

[root@server ~]# in test test2
bash: syntax error near unexpected token `in'

U should use ln (Small letter L), you are using 'in' which is wrong.

ramadas88 09-15-2010 04:32 AM

thanks .......


its works,i got misunderstood as there is also command 'in'


All times are GMT -5. The time now is 07:18 PM.