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

Re: Listing Files - Permissions in Octal?



On Sunday 18 July 2004 02:35 pm, Thomas Adam wrote:
> --- ms419@freezone.co.uk wrote:
> > How can I generate a directory listing, including permissions
> > represented in octal, instead of "r", "w", & "x"?
>
> Use "stat" to piece it together:
>
> [n6tadam@station n6tadam]$ stat -c '%a %A %G %U %N' *
> 644 -rw-r--r-- n6tadam n6tadam `trymr'
> 644 -rw-r--r-- n6tadam n6tadam `trytrytry.wav'

Interesting.  If somebody had shown me that a long time ago, I wouldn't be 
having to keep up with my forked version of ls.  :)

->ls -O /tmp/foo*
 640 -rw-r-----    1 silvan   silvan       6606 Jun 20 03:22 /tmp/foo.ps

Maybe I'll finally let it die.  I'm really tired of keeping up with it, and 
the idea just never caught anybody's eye.

-- 
Michael McIntyre  ----   Silvan <dmmcintyr@users.sourceforge.net>
Linux fanatic, and certified Geek;  registered Linux user #243621
http://www.geocities.com/Paris/Rue/5407/



Reply to: