Unix file move

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
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Unix file move

Post by vsi »

Hi all,


I used an unix command to move data. In process forgot to type target file name.

Lets say I had PathA/fileA and had to move to PathB/fileB. I forgot to specify FileB and typed the command (from PathA) as

mv ./fileA PathB

Now I cant find the fileA anywhere. Has anyone got any idea where it could be??

Thanks
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Vsi..
Probably it must be moved to PATHB. Can you give the exact path of PATHB..

Thank you..
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Post by vsi »

I was in (/nz/etl/dev/dbx/in)

Code: Select all

mv   ./client_ext.lst    /nz/etl/crt/dbx/in
Dsnew
Participant
Posts: 90
Joined: Tue Apr 19, 2005 2:08 pm

Post by Dsnew »

The fileA will be moved to PathB.
Your file movement would be PathB/fileA rather than PathB/fileB

If you dont give a name to the file during your move it retains the same name as the source file

So your will be in -

/nz/etl/crt/dbx/in with the same file name i.e client_ext.lst
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Or
1)there may be a chance to be in the PATHA only.probabably as a file name "/nz/etl/crt/dbx/in"
Or
2)as a file "in" in PATHB(/nz/etl/crt/dbx/)
OR
3) as a file "/nz/etl/crt/dbx/" in PATHB

I am not sure..but try to check
Dsnew wrote:The fileA will be moved to PathB.
Your file movement would be PathB/fileA rather than PathB/fileB

If you dont give a name to the file during your move it retains the same name as the source file

So your will be in -

/nz/etl/crt/dbx/in with the same file name i.e client_ext.lst
thank you
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

It should move the file. Check your return code or error log of the command used for more info.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply