How to create and remove soft link (symbolic) in Solaris AIX?

Soft link is the shortcut or alias name for a file or directory. It is just access path or name for an actual file or directory. So when you remove the soft link it will not affect the actual files present in the directory.
When you discuss about soft link, I wish to mention about hard link also. Hard links are just opposite to soft links.
It is directly referring to the actual target. If you remove hard link it will remove the actual target.
Syntax:
ln –s <actual file or directory name> <link name>
Example
ln -s /usr/local/sbin/someoddplace/perl  /bin/perl
How to remove a soft link?
There are 2 ways to remove a soft link.
  1. unlink <link name>
  2. rm <link name>
Example

$ ls -ltr
total 2
lrwxrwxrwx   1 oracle   dba           26 Jun 23 20:56 11.1.0 -> /data/oracle/product/11.1.0
$ unlink 11.1.0
$ ls -ltr
total 0
DBA Tips Data Pump Reference

0 comments:

Post a Comment

 

dba topics. Copyright 2011-16 All Rights Reserved | Site Map | Contact | Disclaimer | Google