mtree - how to ignore paths when creating the specification? - BSD

This is a discussion on mtree - how to ignore paths when creating the specification? - BSD ; Does mtree even allow this sort of thing? It would appear not... $ sudo mtree -cK ignore /bin -xp / usage: mtree [-cdeilnqrtUux] [-f spec] [-K key] [-k key] [-p path] [-s seed] $ sudo mtree -cK ignore=/bin -xp / ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: mtree - how to ignore paths when creating the specification?

  1. mtree - how to ignore paths when creating the specification?

    Does mtree even allow this sort of thing? It would appear not...

    $ sudo mtree -cK ignore /bin -xp /
    usage: mtree [-cdeilnqrtUux] [-f spec] [-K key] [-k key] [-p path] [-s seed]

    $ sudo mtree -cK ignore=/bin -xp /
    mtree: unknown keyword ignore=/bin


  2. Re: mtree - how to ignore paths when creating the specification?

    On 2005-09-19, gargoyle wrote:
    > Does mtree even allow this sort of thing? It would appear not...
    >
    > $ sudo mtree -cK ignore /bin -xp /
    > usage: mtree [-cdeilnqrtUux] [-f spec] [-K key] [-k key] [-p path] [-s seed]
    >
    > $ sudo mtree -cK ignore=/bin -xp /
    > mtree: unknown keyword ignore=/bin
    >


    Poking at the source code for mtree (/usr/src/usr.sbin/mtree) ...

    1) the ignore keyword does not take a value - see misc.c

    2) the ignore keyword is not used when -c is specified ("see" it's lack
    of presence in create.c)

    Playing a little more, I ran
    mtree -c -K md5digest -p . > mtree.sav

    from my home directory. Part of mtree.sav consisted of about 50 lines for
    my home/tmp directory, which started with
    # ./tmp
    tmp type=dir mode=0755 nlink=3 time=1125582578.238338000

    I all the lines up to the ending
    # ./tmp
    ..
    and added the ignore keyword to that first line. Now it looks like:
    tmp ignore type=dir mode=0755 nlink=3 time=1125582578.238338000

    at which point, the commands
    touch tmp/f{1234}
    mtree -f mtree.sav

    gave me some output, none of which included the newly create tmp files.

    Some of the other keywords on the tmp line (as created) can be removed
    without causing mtree to trigger differences, but not all of them.

    --
    ratfood@food.skaterat.net
    All foods should be removed to reply

+ Reply to Thread