Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   in the tarpit -- cannot exclude cache (http://www.linux-archive.org/ubuntu-user/711551-tarpit-cannot-exclude-cache.html)

Nils Kassube 10-11-2012 05:39 PM

in the tarpit -- cannot exclude cache
 
Kevin O'Gorman wrote:
> I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
> directory I want to exclude, but it's not getting excluded.
> The command runs as root, and the complete command line is
>
> sudo tar --absolute-names --one-file-system --exclude-caches -czf
> treat.home.manual-121011.tgz /home
>
> and changing the type of --exclude does not help.

I'm not sure if it matters, but according to the man page on my 10.04
machine the option would be "-exclude-caches" with only one "-" at the
start.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"Kevin O'Gorman" 10-11-2012 05:59 PM

in the tarpit -- cannot exclude cache
 
On Thu, Oct 11, 2012 at 10:39 AM, Nils Kassube <kassube@gmx.net> wrote:
> Kevin O'Gorman wrote:
>> I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
>> directory I want to exclude, but it's not getting excluded.
>> The command runs as root, and the complete command line is
>>
>> sudo tar --absolute-names --one-file-system --exclude-caches -czf
>> treat.home.manual-121011.tgz /home
>>
>> and changing the type of --exclude does not help.
>
> I'm not sure if it matters, but according to the man page on my 10.04
> machine the option would be "-exclude-caches" with only one "-" at the
> start.

Thanks.

That's the sort of thing that I could easily miss, but my 12.04 man
page uses two dashes for

--exclude-caches
exclude contents of directories containing CACHEDIR.TAG,

--exclude-caches-all
exclude directories containing CACHEDIR.TAG

--exclude-caches-under
exclude everything under directories containing CACHEDIR.TAG

And I would expect it to complain if I got it wrong. With only one
dash, it complains
tar: invalid option -- 'e'

--
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Mike Kupfer 10-12-2012 12:13 AM

in the tarpit -- cannot exclude cache
 
Kevin O'Gorman wrote:

> I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
> directory I want to exclude, but it's not getting excluded.

http://www.gnu.org/software/tar/manual/html_node/exclude.html suggests
that the CACHEDIR.TAG file needs to have certain contents for it to do
what you want.

A cache directory tag is a short file with the well-known name
ʽCACHEDIR.TAGʼ and having a standard header specified in
http://www.brynosaurus.com/cachedir/spec.html.

regards,
mike

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Patrick Asselman 10-12-2012 06:21 AM

in the tarpit -- cannot exclude cache
 
On 2012-10-11 19:59, Kevin O'Gorman wrote:
On Thu, Oct 11, 2012 at 10:39 AM, Nils Kassube <kassube@gmx.net>
wrote:

Kevin O'Gorman wrote:

I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
directory I want to exclude, but it's not getting excluded.
The command runs as root, and the complete command line is

sudo tar --absolute-names --one-file-system --exclude-caches
-czf

treat.home.manual-121011.tgz /home

and changing the type of --exclude does not help.


I'm not sure if it matters, but according to the man page on my
10.04
machine the option would be "-exclude-caches" with only one "-" at
the

start.


Thanks.

That's the sort of thing that I could easily miss, but my 12.04 man
page uses two dashes for

--exclude-caches
exclude contents of directories containing CACHEDIR.TAG,

--exclude-caches-all
exclude directories containing CACHEDIR.TAG

--exclude-caches-under
exclude everything under directories containing
CACHEDIR.TAG


And I would expect it to complain if I got it wrong. With only one
dash, it complains
tar: invalid option -- 'e'

--
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.


It smells like you are putting a CACHEDIR.TAG file in all the
directories you want to exclude, but you should probably create only one
CACHEDIR.TAG file that shows what you consider to be cache dirs, after
which tar will exclude all those types of directories.


If it is not just cache dirs you want to exclude, you can create an
exclude file and specify in the file all the directories you do not want
to be in the tar ball.


Best regards,
Patrick Asselman


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"Kevin O'Gorman" 10-13-2012 02:29 AM

in the tarpit -- cannot exclude cache
 
On Thu, Oct 11, 2012 at 5:13 PM, Mike Kupfer <m.kupfer@acm.org> wrote:
> Kevin O'Gorman wrote:
>
>> I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
>> directory I want to exclude, but it's not getting excluded.
>
> http://www.gnu.org/software/tar/manual/html_node/exclude.html suggests
> that the CACHEDIR.TAG file needs to have certain contents for it to do
> what you want.
>
> A cache directory tag is a short file with the well-known name
> ‘CACHEDIR.TAG’ and having a standard header specified in
> http://www.brynosaurus.com/cachedir/spec.html.

Genius! That solved it.
Now to complain that there is no hint of the requirement for special
contents in the tar man page.

For now, I'm switching over to --exclude-tag=CACHEDIR.TAG so the
contents of the tag file are not important.

--
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

"Kevin O'Gorman" 10-13-2012 02:32 AM

in the tarpit -- cannot exclude cache
 
On Thu, Oct 11, 2012 at 11:21 PM, Patrick Asselman <iceblink@seti.nl> wrote:
> On 2012-10-11 19:59, Kevin O'Gorman wrote:
>>
>> On Thu, Oct 11, 2012 at 10:39 AM, Nils Kassube <kassube@gmx.net> wrote:
>>>
>>> Kevin O'Gorman wrote:
>>>>
>>>> I've done a "touch /home/kevin/.cache/CACHEDIR.TAG" to mark the
>>>> directory I want to exclude, but it's not getting excluded.
>>>> The command runs as root, and the complete command line is
>>>>
>>>> sudo tar --absolute-names --one-file-system --exclude-caches -czf
>>>> treat.home.manual-121011.tgz /home
>>>>
>>>> and changing the type of --exclude does not help.
>>>
>>>
>>> I'm not sure if it matters, but according to the man page on my 10.04
>>> machine the option would be "-exclude-caches" with only one "-" at the
>>> start.
>>
>>
>> Thanks.
>>
>> That's the sort of thing that I could easily miss, but my 12.04 man
>> page uses two dashes for
>>
>> --exclude-caches
>> exclude contents of directories containing CACHEDIR.TAG,
>>
>> --exclude-caches-all
>> exclude directories containing CACHEDIR.TAG
>>
>> --exclude-caches-under
>> exclude everything under directories containing CACHEDIR.TAG
>>
>> And I would expect it to complain if I got it wrong. With only one
>> dash, it complains
>> tar: invalid option -- 'e'
>>
>> --
>> Kevin O'Gorman
>>
>> programmer, n. an organism that transmutes caffeine into software.
>
>
> It smells like you are putting a CACHEDIR.TAG file in all the directories
> you want to exclude, but you should probably create only one CACHEDIR.TAG
> file that shows what you consider to be cache dirs, after which tar will
> exclude all those types of directories.

It's not clear this can be done.

> If it is not just cache dirs you want to exclude, you can create an exclude
> file and specify in the file all the directories you do not want to be in
> the tar ball.

I'd rather put it where the cache is rather than in some separate
place with no obvious connection to the directory unless you're
reading my script.

As mentioned in a previous posting, the --exclude-caches thing
requires specific contents for the tag file. I'll use
--exclude-tag=CACHEDIR.TAG instead. This will work nicely.

--
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 08:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.