Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple commands at same time 1

Status
Not open for further replies.

unixisgood

Technical User
Jan 26, 2005
25
GB
Hi all,

I have already use commands in a script in order as below.

tar -cf /dsk1/trash.tar /disk3/trash
compress /disk1/trash.tar
rcp -r /disk1/trash.tar.Z host2:/disk3

But it takes quite long time

Is there a way to put them together to make them run in same time to save time.?

I know how to extract it quickly by `uncompress -c /disk3/trash.tar.Z|tar -xvf - ` but i need also a quick way to compress and send to other host.

Regards
 
Try this.
Code:
tar -cf - /disk3/trash | compress -c | rsh host2 "cat >/disk3/trash.tar.Z"
 
Hi hoinz,

Thanks for reply. rsh works as remsh in HPUX. I have tried by changing that and it works. But i have also tried to extract what i have sent to other node. But when i try to untar it says Tar: blocksize = 3.

Any idea?
 
Glad it helped, thanks for the star! [smile]
And sorry for the rsh/remsh mistake; usually I use neither of them, but ssh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top