1841319 Members
2407 Online
110179 Solutions
New Discussion

files processing

 
SOLVED
Go to solution
dipesh_2
Regular Advisor

files processing

how do i can copy, backup with tar and untared it on another linux system in one short command.
3 REPLIES 3
Vitaly Karasik_1
Honored Contributor
Solution

Re: files processing

tar cf - .| rsh remote_linux_box "cd /target_dir; tar xf -"
Steven E. Protter
Exalted Contributor

Re: files processing

Shalom dipesh,

Since rsh is being deprecated and not part of the standard Linux install, though you can still use it, take the above command and use ssh instead.

If the system is recent (the last 5 years) the command will work after a password prompt.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sergejs Svitnevs
Honored Contributor

Re: files processing

You can use tar over ssh tunnel:

tar -czf - | ssh tar -xzf - -C

Regards,
Sergejs