File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes Running unix script in multiple Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Running unix script in multiple Threads" Watch "Running unix script in multiple Threads" New topic

Running unix script in multiple Threads

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi All,

I am running a unix script from multiple threads,by passing some input parameter like directory name etc.

In the unix script i am login to some other envirnment and trying to SFTP files from there to my own server directory.

These files are in different directory & needs to be copied in different location on the server.

Now the problem coming is,when the scipt is doing copy task to some directory.

Other thread which is also running the same script comes and changes the directory which leads the files to get copied at different location.

Any suggestions to resolve this.


SCJP6.0,My blog Ranchers from Delhi
Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

What do you mean "changes the directory"?
I agree. Here's the link:
subject: Running unix script in multiple Threads
It's not a secret anymore!