- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to unzip and untar xyz.tar.gz file from one h...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2020 02:59 AM
01-18-2020 02:59 AM
How to unzip and untar xyz.tar.gz file from one hpux server to another remote hpux server
I have created tar.gz from below mentioned command
$cd /abc
$tar cvf - abc | gzip > abc.tar.gz
now i need to unzip and untar this file to remote server.
Kindly provide the single command throgh i can unzip and untar together on remote hp ux server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2020 07:26 AM - edited 01-18-2020 07:29 AM
01-18-2020 07:26 AM - edited 01-18-2020 07:29 AM
Re: How to unzip and untar xyz.tar.gz file from one hpux server to another remote hpux server
> [...] hpux server [...]
uname -a
> now i need to unzip and untar this file to remote server.
How did you intend to get logged into the "remote server? rsh? ssh?
Other? How did you intend to transfer the ".tar.gz" file to the "remote
server"? FTP? NFS? rcp? scp? Other?
After you transfer the file to the remote system, you could, on the
"remote server", use a command like:
gzip -cd abc.tar.gz | tar xf -
Rather than create "abc.tar.gz", you could do everything in one
command pipeline like the following:
tar cf - abc | \
rsh remote_host ' ( cd <dest_dir> ; gzip -cd - | tar xf - ) '
A Web search for terms like, say:
tar pipeline
should find many examples and refinements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 12:34 AM
01-22-2020 12:34 AM
Re: How to unzip and untar xyz.tar.gz file from one hpux server to another remote hpux server
Hello Steven Schweda,
Thanks for reply.. but my query is that i have backup file abc.tar.gz on one server and i want to transfer, unzip and untar it on another hpux server. because i have limited disk space that i want this solution in one step.
Is there any single command that will transfer, unzip and untar in single command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 02:16 AM
01-22-2020 02:16 AM
Re: How to unzip and untar xyz.tar.gz file from one hpux server to another remote hpux server
> Is there any single command that will transfer, unzip and untar in
> single command.
"transfer" how?
> How did you intend to get logged into the "remote server? rsh? ssh?
> Other? How did you intend to transfer the ".tar.gz" file to the "remote
> server"? FTP? NFS? rcp? scp? Other?
Still wondering. Do you ever answer questions, or do you only ask
more? (Or the same ones again?)
> tar cf - abc | \
I somehow omitted the "gzip" part of that. Perhaps better:
tar cf - abc | gzip -c | \
> A Web search for terms like, say:
>
> tar pipeline
>
> should find many examples and refinements.
Still true.
A more general form:
( cd <src_dir> ; tar cf - <src> | gzip -c ) | \
rsh <remote_host> ' ( cd <dest_dir> ; gzip -cd - | tar xf - ) '
> [...] i have backup file abc.tar.gz on one server [...]
So, change the first line to:
cat abc.tar.gz | \
> [...] i have limited disk space [...]
That's why making "abc.tar.gz" is a poor idea, when you can do
everything in one pipeline without saving the intermediate data in a
file anywhere. (See "A more general form", above.)
Instead of "rsh", you could use "ssh". Whichever works between your
systems.