need help with tar

You'd think after 20 years of using tar I'd have it figured out by now ... I'm trying to list files in a tarfile of the form:

home/HPRS/matkeson/Maildir/.Deleted Items/

and

home/HPRS/matkeson/Maildir/.Deleted Items.Travel/

That is, files under the directory "... /.Deleted Items/" and files with directory names beginning with "... /.Deleted Items"

If I do
$ tar -tvjf /mnt/backup/MAIL/2015-11-11-MAILdifferential.tar.bz2 "home/HPRS/matkeson/Maildir/.Deleted Items"
drwx------ matkeson/users    0 2015-11-11 16:50 home/HPRS/matkeson/Maildir/.Deleted Items/
drwx------ matkeson/users    0 2015-11-11 11:14 home/HPRS/matkeson/Maildir/.Deleted Items/cur/
-rw------- matkeson/users 1532 2015-11-09 19:09 home/HPRS/matkeson/Maildir/.Deleted Items/cur/1447117977.M71105
4P10777.mail,S=1532,W=1560:2,S
-rw------- matkeson/users 8044 2015-11-06 10:17 home/HPRS/matkeson/Maildir/.Deleted Items/cur/1447078386.M89484
5P6918.mail,S=8044,W=8259:2,S

Open in new window

I only get files in the directory ".Deleted Items". If I do
tar -tvjf /mnt/backup/MAIL/2015-11-11-MAILdifferential.tar.bz2 "home/HPRS/matkeson/Maildir/.Deleted Items*" --wildcards

Open in new window

I get nothing at all.

What am I doing wrong?
LVL 1
MarkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
"--wildcards" must appear before the member name argument:

tar -tvjf /mnt/backup/MAIL/2015-11-11-MAILdifferential.tar.bz2 --wildcards "home/HPRS/matkeson/Maildir/.Deleted Items*"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
woolmilkporcCommented:
Explanation:

The effect of "--wildcards" (globbing) can be reversed by "--no-wildcards".

So if you have a member name containing an asterisk to be passed verbatim  
(something like "name2*" where you don't want to list other members starting with "name2") you could do:

tar -tvf archive.tar --wildcards "pattern1*" --no-wildcards "name2*"

The above would not work could you place the "--(no-)wildcards" option just anywhere in the command string.
The same is true for similar options like "--(no)-ignore-case" etc.
MarkAuthor Commented:
Thanks woolmilkproc. Too bad I didn't have the smarts to simply try putting the --wildcards before the pattern. Duh!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.