bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64100] wish/request: please reserve -printf "%V %v %E %R %r %B %e


From: raf
Subject: [bug #64100] wish/request: please reserve -printf "%V %v %E %R %r %B %e %J %I %z %x %X %j"
Date: Sun, 23 Apr 2023 19:57:47 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64100>

                 Summary: wish/request: please reserve -printf "%V %v %E %R %r
%B %e %J %I %z %x %X %j"
                   Group: findutils
               Submitter: raf
               Submitted: Sun 23 Apr 2023 11:57:45 PM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: raf
        Originator Email: 
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
           Fixed Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 23 Apr 2023 11:57:45 PM UTC By: raf <raf>
Hi,

I've written a find-alternative called rawhide (rh) that does almost
everything that GNU find can do (except file system type names), and can do a
few additional things.

Rawhide's version of -printf (its -L option) has some extra %-notation things
that I'm hoping you will consider reserving for potential future use in find:

    %V  The major device number of the device/filesystem that the file resides
on (part of st_dev).

    %v  The minor device number of the device/filesystem that the file resides
on (part of st_dev).

    %E  The device number of the file (st_rdev). This is only meaningful for
character devices and block devices.
        See the related %R and %r format conversions (next) for the major and
minor device numbers of the
        file.

    %R  The major device number of the file (part of st_rdev). This is only
meaningful for character
        devices and block devices.

    %r  The minor device number of the file (part of st_rdev). This is only
meaningful for character
        devices and block devices.

    %B  The preferred block size for efficient I/O on the file's filesystem
(st_blksize). On some filesystems
        (e.g., zfs), this is specific to each file, rather than to the whole
filesystem.

    %e  The ext2-style file attributes as a space-separated list of attribute
names. This is available on
        Linux systems with libe2p. See chattr(1) and lsattr(1) for details. On
other systems, this is the
        empty string.

        The possible ext2-style file attribute names are: secrm, unrm, compr,
sync, immutable, append, nodump,
        noatime, dirty, comprblk, nocompr, encrypt, index, imagic,
journal_data, notail, dirsync, topdir,
        huge_file, extents, verity, ea_inode, nocow, snapfile, dax,
snapfile_deleted, snapfile_shrunk,
        inline_data, projinherit, and casefold.

    %J  The ext2-style project number. This is available on Linux systems with
libe2p. See chattr(1) and
        lsattr(1) for details. On other systems, this is the empty string.

    %I  The ext2-style version/generation number. This is available on Linux
systems with libe2p. See
        chattr(1) and lsattr(1) for details. On other systems, this is the
empty string.

    %z  The access control list (ACL) as a comma-separated list of items. This
is available on Linux, FreeBSD,
        macOS, Solaris, and Cygwin. On systems without supported ACLs, this is
the empty string.

        FreeBSD and Solaris have NFSv4 ACLs with two forms of ACL text. By
default, the compact form will be
        output. With the -v option, the non-compact form will be output. For
"POSIX" ACLs (Linux and Cygwin)
        and macOS ACLs, the -v option has no effect.

        On Solaris, ACLs are always present by default, even if they are
trivially identical to the file
        permission bits.

    %x  The extended attributes (EA) as a comma-separated list. This is
available on Linux, FreeBSD, macOS,
        Solaris, and Cygwin. On systems without supported EAs, this is the
empty string.

    %X  The access control list/extended attributes (ACL/EA) indicator (like
in rh -l). When a (non-trivial)
        ACL is present, this is a plus sign ("+"). When any (interesting) EAs
are present, this is an at sign
        ("@"). When both are present, this is an asterisk character ("*").
When neither is present, but there
        is an selinux(8) context, this is a dot character ("."). When none of
the above are present, this is a
        space character (" ").

    %j  All of the file information in JSON format, representing an object
with the following possible
        attributes:

            path (string) (same as %p)
            name (string) (same as %f)
            target (string) (same as %l) (only for symlinks)
            start (string) (same as %H)
            depth (integer) (same as %d)
            dev (integer) (same as %D)
            major (integer) (same as %V)
            minor (integer) (same as %v)
            ino (integer) (same as %i)
            mode (integer) (like %M, but in the underlying numeric form)
            modestr (string) (same as %M)
            type (string) (same as %y)
            perm (integer) (same as %m, but in decimal)
            nlink (integer) (same as %n)
            user (string) (same as %u) (only if a name is available)
            group (string) (same as %g) (only if a name is available)
            uid (integer) (same as %U)
            gid (integer) (same as %G)
            rdev (integer) (same as %E)
            rmajor (integer) (same as %R)
            rminor (integer) (same as %r)
            size (integer) (same as %s)
            blksize (integer) (same as %B)
            blocks (integer) (same as %b)
            atime (string) (like %a/%A@, but in ISO format)
            mtime (string) (like %t/%T@, but in ISO format)
            ctime (string) (like %c/%C@, but in ISO format)
            atime_unix (integer) (same as %A@)
            mtime_unix (integer) (same as %T@)
            ctime_unix (integer) (same as %C@)
            attributes (string) (same as %e) (only if available)
            project (integer) (same as %J) (only if available)
            generation (integer) (same as %I) (only if available)
            access_control_list (string) (like %z without the -v option, but
not reformatted as a comma-separated list) (only if present)
            access_control_list_verbose (string) (like %z with the -v option,
but not reformatted as a comma-
            separated list) (only if present)
            extended_attributes (string) (like %x, but not reformatted as a
comma-separated list) (only if present)
            selinux_context (string) (same as %Z) (only if present)
            acl_ea_indicator (string) (same as %X)


I'm not asking for any of this functionality to be added to GNU find. But if
any of it ever does get added, please consider using the above %-notation so
that the two programs remain in sync. It would be nicer that way for any users
of both programs.

Thanks.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64100>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]