1
vote
2answers
64 views

tar specific files based on a pattern

I got a lot of files with the following format: 2014_04_01_11.txt 2014_04_01_12.txt 2014_04_01_13.txt 2013_03_25_12.txt 2013_04_29_15.txt I would like to tar all theses files into an archive 20?? _ ...
2
votes
1answer
71 views

Does * match hidden files in tar even with dotglob unset?

I was under the impression that the * glob does not match dot-prefixed files unless you manually enable such functionality (through dotglob, or your shell's equivalent). Yet if I have a directory a ...
2
votes
6answers
1k views

How to make tar globbing work with the 'change directory' option

I have the followin directory structure: base/ files/ archives/ scripts/ I want a script to run from scripts/, compress files that match results.*.log in files/ into a gzipped tar archive ...
18
votes
2answers
877 views

What does .??* mean in a shell command?

The following command will tar all "dot" files and folders: tar -zcvf dotfiles.tar.gz .??* I am familiar with regular expressions, but I don't understand how to interpret .??*. I executed ls .??* ...
4
votes
3answers
2k views

Why does tar --exclude=“.*” create an empty archive?

Everything I read says that to exclude .svn and .htaccess and other hidden files when creating a tar archive, use the --exclude=".*" pattern. When I try, I get an empty archive. When I leave out the ...
2
votes
2answers
287 views

Untar directory from large tarball

How do I untar a directory that I don't know the path to? I only know the directory name. I know how to untar a single file with a wildcard: tar -xf somefile.tar.gz --wildcards --no-anchored ...
3
votes
5answers
700 views

How do I extract all .htaccess files from a tarball?

I want to extract all .htaccess files from a tarball, how can I do so? I see only one mention of "include" in the manual page of tar which is not related with an option for including only certain ...
2
votes
3answers
1k views

untar a directory of *.tgz files using a wildcard

I've got a directory that looks like $ ls Broad_hapmap3_r2_Affy6_cels_excluded.tgz DINGO.tgz GIGAS.tgz index.html IONIC.tgz passing_cels_sample_map.txt ...