- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Re: ln command
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-2006 05:09 PM
12-03-2006 05:09 PM
how do i use ln command??
for doing something like this one (where appears "->" ):
lrwxrwxrwx 1 root sys 18 Nov 24 2001 global -> /sapmnt/CP1/global
lrwxrwxrwx 1 root sys 19 Nov 24 2001 profile -> /sapmnt/CP1/profile
THANKS ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-2006 05:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-2006 10:19 PM
12-03-2006 10:19 PM
Re: ln command
if you are looking for the C-interface:
man symlink
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-04-2006 01:01 AM
12-04-2006 01:01 AM
Re: ln command
ln /home/myfile /home/linkfile
After using this command, linkfile will be created and will contain the same data as myfile. On the file system level, a directory entry with the name linkfile is created, which points to the same inode used by myfile. Hard links can be created only within a file system; you cannot link directories with hard links.
To create a soft link, you use the -s option with the ln command. When creating a soft link, HP-UX creates a file entry with its own inode number in the directory area. This inode number then points to a data block that contains the file name to which the link is established. Soft links can link directories and can be used between file systems.
for more information please visit the below link.
http://docs.hp.com/en/B2355-90689/ln.1.html
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-04-2006 03:28 PM
12-04-2006 03:28 PM
Re: ln command
Best way is check for Manpage for "ln".
There are two ways for that:
"ln" (Hardlink) and "ln -s" (soft Link).
In your case it should be like this:
ln -s global /sapmnt/CP1/global
ln -s profile /sapmnt/CP1/profile
Hope this will answer your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-04-2006 03:51 PM
12-04-2006 03:51 PM
Re: ln command
ln -s /sapmnt/CP1/global .
Note: Samir's example is backwards.
One point about symlinks, if you want them to work over NFS, you should make them self relative. The above link would only work if /sapmnt was also mounted on the client.
If you were in /sapmnt/CP2, you would use:
ln -s ../CP1/global .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-04-2006 10:41 PM
12-04-2006 10:41 PM
Re: ln command
I always think of the -s as source. Just helps me remember. So
ln -s /var/tmp/mysourcefile /var/tmp/mylinkfile
would create the link /var/tmp/mylinkfile to the source file /var/tmp/mysourcefile.
A long listing in /var/tmp would show
mylinkfile -> /var/tmp/mysourcefile
HTH,
Berd
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP