coreutils
[Top][All Lists]
Advanced

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

xattr and acl support in ls


From: April Arcus
Subject: xattr and acl support in ls
Date: Mon, 21 Apr 2014 11:49:20 -0700

Feature request per @pixelbeat_ ( 
https://twitter.com/pixelbeat_/status/458221138964127745 )

Apple's fork of FreeBSD's ls supports the options -@ and -e to show extended 
attributes and access control lists, respectively:

Zephyr:~ ril$ /bin/ls -lFh -e ~
total 2944
drwxr-xr-x    4 ril  staff   136B Feb 17 16:06 Applications/
drwxr-xr-x@   5 ril  staff   170B Mar 31 20:39 Applications (Parallels)/
drwxr-xr-x  156 ril  staff   5.2K Nov  9  2011 CS3 Fonts/
drwxr-xr-x@  16 ril  staff   544B Dec 11 23:35 Classic/
drwx------@  63 ril  staff   2.1K Apr 19 14:35 Desktop/
 0: group:everyone deny delete
drwx------+  30 ril  staff   1.0K Feb 17 15:47 Documents/
 0: group:everyone deny delete
drwx------+ 179 ril  staff   5.9K Apr 21 10:52 Downloads/
 0: group:everyone deny delete

Zephyr:~ ril$ /bin/ls -lFh -@ ~
total 2944
drwxr-xr-x    4 ril  staff   136B Feb 17 16:06 Applications/
drwxr-xr-x@   5 ril  staff   170B Mar 31 20:39 Applications (Parallels)/
        com.apple.FinderInfo      32B
drwxr-xr-x  156 ril  staff   5.2K Nov  9  2011 CS3 Fonts/
drwxr-xr-x@  16 ril  staff   544B Dec 11 23:35 Classic/
        com.apple.FinderInfo      32B
        org.BasiliskII.ExtendedFinderInfo         16B
        org.BasiliskII.FinderInfo         16B
drwx------@  63 ril  staff   2.1K Apr 19 14:35 Desktop/
        CDQJEIS1UO5TGNv0Q2Y_dvi9Ui8Oe2bc=        235B
drwx------+  30 ril  staff   1.0K Feb 17 15:47 Documents/
drwx------+ 179 ril  staff   5.9K Apr 21 10:52 Downloads/

coreutils ls can detect the presence of an ACL, but cannot display it, and is 
oblivious to xattrs:

Zephyr:~ ril$ /usr/local/Cellar/coreutils/8.22/bin/gls -lFh ~
total 1.5M
drwxr-xr-x    4 ril staff  136 Feb 17 16:06 Applications/
drwxr-xr-x    5 ril staff  170 Mar 31 20:39 Applications (Parallels)/
drwxr-xr-x  156 ril staff 5.2K Nov  9  2011 CS3 Fonts/
drwxr-xr-x   16 ril staff  544 Dec 11 23:35 Classic/
drwx------+  63 ril staff 2.1K Apr 19 14:35 Desktop/
drwx------+  30 ril staff 1020 Feb 17 15:47 Documents/
drwx------+ 179 ril staff 6.0K Apr 21 10:52 Downloads/

I am currently using a kludgy shim to dynamically switch between BSD and GNU ls 
depending on the passed in flags ( https://gist.github.com/AprilArcus/11124713 
) - it would be great if coreutils supported these features, so that I could 
stop doing this ^^

-April


reply via email to

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