Re: Excluding a directory from tar
On 2015-04-13 16:15:42 +0200, Petter Adsen wrote:
> 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/*".
The ~ is not expended here:
$ echo "~/foo"
~/foo
Try --exclude="$HOME/.cache" or similar.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Reply to: