3

Can the output a list command contain permissions listed. For example, when executing find / -name filename 2> /dev/null and I get results, is it possible to have my results include the file permissions? Thanks in advance!

7

Check out this command:

$ find . -name '*.sh' -printf "depth="%d/"sym perm="%M/"perm="%m/"size="%s/"user="%u/"group="%g/"name="%p/"type="%Y\\n

depth=1/sym perm=-rwxr-xr-x/perm=755/size=1678/user=root/group=root/name=./yadpanned.sh/type=f
depth=1/sym perm=-rwxr-xr-x/perm=755/size=154/user=root/group=root/name=./remove.sh/type=f

Not the answer you're looking for? Browse other questions tagged or ask your own question.