- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ln command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
- 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
- Report Inappropriate Content
тАО12-03-2006 05:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- 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
- 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
- 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
- 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
- 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