Opening &PH& Directory

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Opening &PH& Directory

Post by sri75 »

HI ,

I would like to open &PH& directory and see all the files in it.But I am not able to open it.Can you please tell me how to open it.I tried to open it with 'cd &PH&'

Thanks
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Opening &PH& Directory

Post by gateleys »

sri75 wrote:I tried to open it with 'cd &PH&'
:shock:

cd => change directory

How about ls?
gateleys
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

gateleys ,Thanks for your reply.

I tried with 'ls' too.but it gave all the files that are under projects folder, that included &PH& directory too.

Thanks
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

sri75 wrote: I tried with 'ls' too.but it gave all the files that are under projects folder, that included &PH& directory too.
Good! Now, if you do a list on the &PH& folder, it will list all the files and directories within it. See!!!
gateleys
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

Escape the ampersands.

cd \&PH\&
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

Thanks throbinson.It worked perfect

Now I am able to open the directory.

Thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

& is a reserved character in unix, it runs a command in the background. This particular annoying directory needs special handling.

From now on, just use quotes around it: cd "&PH&"
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You probably need "hard quotes" (single quotes).
You don't need to cd.

Code: Select all

ls -lrt '&PH&'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply