The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Please write this script for me nadman123 Shell Programming and Scripting 1 04-08-2008 10:30 PM
Help me to write the script gyana_cboy Shell Programming and Scripting 5 10-05-2007 02:19 AM
How to write script for this ? me_haroon AIX 0 07-01-2006 06:30 AM
need help to write shell script getdpg Shell Programming and Scripting 0 04-10-2006 10:30 AM
Help! Need to write my first script fundidor Shell Programming and Scripting 5 01-08-2004 10:20 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-18-2008
naveeng.81 naveeng.81 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 14
how to write script in tar

i have the script.in this script comprees formatlike tar and insert to another directory and another sever.and how to write this process in script .
iam new for unix how to do this process.




please helpmea
naveen.g
  #2 (permalink)  
Old 04-18-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
As far as I do understand you, you want to write a script which does the following on the fly:
1) compress a directory like tar would
2) instead of writing the tar file to disk, you want to "stream" it to another server
3) there you want to unpack it

The following should do this:

(cd /source/dir && tar czf - .) | ssh login@server.tld "cd /target/dir/ && tar xzf -"
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0