LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tar wildcards doesnt work (https://www.linuxquestions.org/questions/linux-newbie-8/tar-wildcards-doesnt-work-684768/)

sleith 11-19-2008 09:23 PM

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

tajamari 11-19-2008 09:55 PM

Quote:

Originally Posted by sleith (Post 3348174)
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


All times are GMT -5. The time now is 09:49 PM.