Can one list permission bits numerically...
Paul A. Procacci
pprocacci at datapipe.com
Sun Mar 16 00:49:51 UTC 2008
> Perhaps I missed it somewhere in the man page, but is there a way to
> list files with their permission bits displayed as numeric (octal, as
> in chmod(1)), instead of symbolic? Something like:
> ls -lF -imaginaryFlag
> 0755 4 Modulok Modulok 512 Dec 17 18:39 dir1/
> 0644 1 Modulok Modulok 101786 Feb 23 05:53 file1
> 0644 1 Modulok Modulok 140097 Feb 13 23:38 file2
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
Maybe something like this will suit you:
stat -f "%p %l %u %g %z %m %N" *
It produces output similar to the following:
100755 1 0 0 64 1201845218 blah
The fields that I choose are in the man page, so it should be easy
reading, and is pretty close to `ls -l`.
As for as `ls` having this ability, it doesn't.
More information about the freebsd-questions