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



The Eucharistic Miracles of the World
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.
ln –s <actual file or directory name> <link name>
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>

$ 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


Website Stats


Post a Comment


Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2) Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer