chflags(1) unaware utilties

Carl Johnson carlj at
Wed Aug 11 22:37:59 UTC 2010

Alexander Best <arundel at> writes:

> On Tue Aug 10 10, illoai at wrote:
>> On 9 August 2010 14:00, Alexander Best <arundel at> wrote:
>> > hi there,
>> >
>> > chflags(1) mentions that a few utilities including pax(1) aren't chflags aware yet. is there a list of all those utilties available somewhere?
>> > also: i don't quite understand why this is in the BUGS section of chflags(1) and not in the pax(1) manual itself [1]. this doesn't seem very logical, since the bug doesn't exist in chflags, but in pax not supporting chflags.
>> > so if someone decides to use pax and wants to know if there are any problem with it, there's no way for the average user to stumble upon the fact that chflags isn't supported in pax.
>> >
>> > in fact the pax(1) manual states that `pax -p e` will "preserve everything". this is plain wrong!
>> >
>> > cheers.
>> > alex
>> >
>> > [1]
>> >
>> AFIK, pax is a POSIX thing, and as such working
>> correctly or sanely would violate its posix nature.
>> (POSIX is an anagram of "Pox?  Si!")
> POSIX specs issue 7 state that `pax -p e` should:
> "Preserve the user ID, group ID, file mode bits (see XBD File Mode Bits ), access time, modification time, and any other implementation-defined file characteristics."
> don't chflags fall under "other implementation-defined file characteristics"?
>> Is cpio chflags-aware?
> idea. sorry.

I just did some simple-minded testing and found that BSD tar is
chflags aware, but GNU tar, pax, afio, and cpio are not.  I also found
that BSD cp will copy flags, but GNU cp (from coreutils port) will
not.  I also checked extended attributes (see lsextattr(8)) and found
that only BSD tar will archive them, and cp will not copy them.  I
didn't check dump since someone already said it will work.  I also
checked zfs and found that tar doesn't handle extended attributes
there and zfs doesn't support flags.  The rest of my testings was on
the standard ufs2.

It doesn't look very encouraging to me.

Carl Johnson		carlj at

More information about the freebsd-questions mailing list