GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: About tar
Operating System - HP-UX
1863059
Members
1029
Online
110446
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
09-28-2003 09:21 PM
09-28-2003 09:21 PM
I used the tar command "tar -zcvf " to backup some files ( eg. file a , file b , file c , file d ... ) to a .tgz file , is it possible to extract one of file in this tgz file instead to use "tar -zxvf" to extract all the files ? thx
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2003 09:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2003 09:29 PM
09-28-2003 09:29 PM
Re: About tar
Hi
Try perl
perl -MGT::Tar -le 'GT::Tar->untar("/path/to/tar/file", sub { return unless $_->name eq "file_you_want_to_extract"; $_->name("new/path/to/save"); $_->write; })'
Paula
Try perl
perl -MGT::Tar -le 'GT::Tar->untar("/path/to/tar/file", sub { return unless $_->name eq "file_you_want_to_extract"; $_->name("new/path/to/save"); $_->write; })'
Paula
If you can spell SysAdmin then you is one - anon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2003 10:53 PM
09-28-2003 10:53 PM
Re: About tar
juno2,
This is perfectly possible. "tar zxvf archive.tgz filename". You can have more than one filename so can extract several files at once and if the filename is a directory, it will extract all the files in the directory.
Personally I'd go for Paula's method because then you really can call yourself a totally whacked out perl maestro!
This is perfectly possible. "tar zxvf archive.tgz filename". You can have more than one filename so can extract several files at once and if the filename is a directory, it will extract all the files in the directory.
Personally I'd go for Paula's method because then you really can call yourself a totally whacked out perl maestro!
Never preceed any demonstration with anything more predictive than "watch this"
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP