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

advertisements

_____________________________________________________________________________________________________________________

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.
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

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

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)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer