Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-27-2012, 09:58 AM
|
#1
|
|
Member
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 54
Rep:
|
How to search for a pattern of a tar ball and pipe that name to tar to extract
Hi Guys,
I want to be able to extract a tarball without typing in the entire name of the archive. The name is something like foobarchive9.9.tgz. Is there anyway I can extract that tarball just using foobarch instead of spelling out the entire name? Any help or examples will greatly be appreciated.
Thanks
|
|
|
|
02-27-2012, 02:16 PM
|
#2
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,927
|
I'm not sure what you're asking, but, if you're at a command prompt, then the <tab> key can usually be used to "complete" the command with a matching file name. So, for example, tar -xvf foob<tab> should be all you need to type. (If more than one file name matches the foob, the first <tab> will do nothing, and a second <tab> will list all matching file names.)
|
|
|
|
02-27-2012, 04:28 PM
|
#3
|
|
Member
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 54
Original Poster
Rep:
|
Hi Thanks for the reply. I guess i just need a way to extract a file without typing the whole name and just use some type of wildcard such as :
tar xzvf foobar**.tgz and it will extract the file based off of the matching characters. There has to be a way to do this but I just can't find anything.
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:49 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|