[patch #9754] find: new '-attr' predicate to test inode flags
raf <[email protected]> Thu, 16 Jul 2026 04:47:46 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.findutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
--8323329-1189641421-1784191666=:2849862
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline
Follow-up Comment #8, patch #9754 (group findutils):=0A=0AHere's the full l=
ist of Linux file attributes.=0A=0A s secrm FS_SECRM_FL =
0x00000001 # Secure deletion=0A u unrm FS_UNRM_FL 0x=
00000002 # Undelete=0A c compr FS_COMPR_FL 0x00000004 #=
Compress file=0A S sync FS_SYNC_FL 0x00000008 # Sync=
hronous updates=0A i immutable FS_IMMUTABLE_FL 0x00000010 # Imm=
utable file=0A a append FS_APPEND_FL 0x00000020 # Writes =
to file may only=0Aappend=0A d nodump FS_NODUMP_FL 0x0000=
0040 # Do not dump file=0A A noatime FS_NOATIME_FL 0x000000=
80 # Do not update atime=0A y* dirty FS_DIRTY_FL 0x00000=
100 =0A b* comprblk FS_COMPRBLK_FL 0x00000200 # One or more co=
mpressed=0Aclusters=0A m nocompr FS_NOCOMP_FL 0x00000400 #=
Access raw compressed=0Adata=0A E encrypt FS_ENCRYPT_FL 0x=
00000800 # Encrypted=0A B* btree FS_BTREE_FL 0x00001000 =
# Btree format directory=0A I index FS_INDEX_FL 0x00001=
000 # Hash-indexed directory=0A M* imagic FS_IMAGIC_FL 0x0=
0002000 =0A j journal_data FS_JOURNAL_DATA_FL 0x00004000 # File data =
should be=0Ajournaled=0A t notail FS_NOTAIL_FL 0x00008000=
# File tail should not be=0Amerged=0A D dirsync FS_DIRSYNC_FL =
0x00010000 # Synchronous dir=0Amodifications=0A T topdir FS=
_TOPDIR_FL 0x00020000 # Top of directory=0Ahierarchies=0A h* huge_fi=
le FS_HUGE_FILE_FL 0x00040000 # Set to each huge file=0A e exte=
nts FS_EXTENT_FL 0x00080000 # Inode uses extents=0A V veri=
ty FS_VERITY_FL 0x00100000 # Verity protected inode=0A n* =
ea_inode FS_EA_INODE_FL 0x00200000 # Inode used for large EA=0A=
C nocow FS_NOCOW_FL 0x00800000 # Do not cow file=0A z=
* snapfile 0x01000000 # Inode is a snapshot=0A =
x dax FS_DAX_FL 0x02000000 # Inode is DAX=0A Z* sna=
pfile_deleted 0x04000000 # Snapshot is being=0Adeleted=
=0A U* snapfile_shrunk 0x08000000 # Snapshot shrink ha=
s=0Acompleted=0A N inline_data FS_INLINE_DATA_FL 0x10000000 # Inode=
has inline data=0A P projinherit FS_PROJINHERIT_FL 0x20000000 # Cr=
eate with parents=0Aprojid=0A F casefold FS_CASEFOLD_FL 0x400=
00000 # Casefolded file=0A=0A"*" Not mentioned in chattr(1)=0A=0AThe missin=
g bits are:=0A=0A FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */=0A F=
S_RESERVED_FL 0x80000000 /* reserved for ext2 lib */=0A=0AIt looks like th=
ey should be left out.=0A=0AAlso note that btree and index are the same thi=
ng. Maybe B=3Dbtree could=0Abe left out. I don't know. If it's documented t=
wo ways, maybe it should=0Abe accessible two ways. But the documentation is=
only in C header files.=0AMaybe that doesn't count. :-)=0A=0AI recommend d=
efining and using these (in case they turn up in the headers one=0Aday):=0A=
=0A #ifndef FS_SNAPFILE_FL=0A #define FS_SNAPFILE_FL 0x01000000=0A #endi=
f=0A #ifndef FS_SNAPFILE_DELETED_FL=0A #define FS_SNAPFILE_DELETED_FL 0x0=
4000000=0A #endif=0A #ifndef FS_SNAPFILE_SHRUNK_FL=0A #define FS_SNAPFIL=
E_SHRUNK_FL 0x08000000=0A #endif=0A=0AAnyway, something to think about.=0A=
=0A=0A _______________________________________________________=0A=0ARepl=
y to this item at:=0A=0A <https://savannah.gnu.org/patch/?9754>=0A=0A_____=
__________________________________________=0AMessage sent via Savannah=0Aht=
tps://savannah.gnu.org/=0A
--8323329-1189641421-1784191666=:2849862
Content-Type: APPLICATION/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaliasgAKCRCqLAuaBUf3
TmI3AP4tAvok9q1ZtaK1Mzr1/5cCkaCvnEkKCpl3oWjHQ+cQpAEA7Kd0nXVI6EWX
U2TWimbCI6NOJ3HAOM+5ChBOkQiQqg8=
=UpBb
-----END PGP SIGNATURE-----
--8323329-1189641421-1784191666=:2849862--