How to create symbolic link with alias name

I would like to create symbolic link to directory with alias name.

Source directory : /opt/WebSphere/7.0/
Target Directory : /opt/middleware/websphere/70
Alias name: AppServer
Desired directory after creating link : /opt/WebSphere/7.0/AppServer

For e.g. This is how I would do in Linux/Unix

1. cd /opt/WebSphere/7.0/
2. ln -fs /opt/middleware/websphere/70 AppServer

When I referred Chef resource for link, it is something like this

link “/opt/WebSphere/7.0/” do
to "/opt/middleware/websphere/70"
link_type :symbolic
action :create**

How do I mention “AppServer” alias in this.
/opt/WebSphere/7.0/AppServer (where AppServer is symlink alias)

You can do the Linux command in a single line, and that should also show you the solution to your question:

ln -fs /opt/middleware/websphere/70 /opt/WebSphere/7.0/AppServer

Correspondingly, with the link resource:

link “/opt/WebSphere/7.0/AppServer” do
** to “/opt/middleware/websphere/70” **
** link_type :symbolic**
** action :create**

Kevin Keane
Whom the IT Pros Call
The NetTech
Our values: Privacy, Liberty, Justice

Thanks :slight_smile: This is perfect !