On Mon, 13 Apr 2015 18:41:50 +0200
Jean-Marc <jean-m...@6jf.be> wrote:

> Mon, 13 Apr 2015 16:15:42 +0200
> Petter Adsen <pet...@synth.no> écrivait :
> 
> hi Petter,
> 
> > I've been trying to make a tarball of my home directory, but I want
> > to exclude ~/.cache. First I tried '--exclude="~/.cache", but it
> > didn't work. Neither did '--exclude="~/.cache/*".
> 
> Can you send the command you used ?
> It will be easier to find what's wrong.
> 
> > 
> > I got it working by creating an empty file in ~/.cache and using the
> > filename as an argument to "--exclude-tag-under", but what was I
> > doing wrong when trying to use "--exclude"?
> 
> Maybe the prefix you used (~).
> 
> Try with
> 
> tar -cvf /dev/null --exclude=.cache $HOME | less

That was, in essence, the command I used, and both you and Vincent are
right, the "~" was not expanded. For some reason I was absolutely
convinced that I had tried without it, but clearly I didn't. My shell
history confirms this.

So thank you, both, it is now working perfectly. :)

Petter

-- 
"I'm ionized"
"Are you sure?"
"I'm positive."

Attachment: pgpEP3w6o2sea.pgp
Description: OpenPGP digital signature

Reply via email to