LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-19-2008, 10:23 PM   #1
sleith
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
tar wildcards doesnt work


Hi, i want to tar *.log files but it doesnt work

Code:
tar -czf log.tar -C ./logfiles *.log
I use -C to change folder run time, to make it run from C++.
This command result error:
tar: *.log: Cannot stat: No such file or directory
tar seems detect *.log as file name not wildcards.

Thank you
 
Old 11-19-2008, 10:55 PM   #2
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 30
Quote:
Originally Posted by sleith View Post
Hi, i want to tar *.log files but it doesnt work

Code:
tar -czf log.tar -C ./logfiles *.log
I use -C to change folder run time, to make it run from C++.
This command result error:
tar: *.log: Cannot stat: No such file or directory
tar seems detect *.log as file name not wildcards.

Thank you
Use the absolute path
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work vinay87 Linux - Newbie 2 05-09-2006 10:18 AM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 12:31 PM
mplayer doesnt work at all mayasedai Linux - Software 5 01-15-2005 12:28 PM


All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration