Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Get File Permission

by Happy-the-monk (Abbot)
on Jul 05, 2013 at 14:33 UTC ( #1042724=note: print w/ replies, xml ) Need Help??


in reply to Reaped: Get File Permission

ls -le

What is the -e switch supposedly doing?

This gives you simple user-group-world octal permissions on all files in the current directory if you restrain from learning ls switches ;-)

perl -e'printf("%03o $_\n",(stat("$_"))[2]&07777,$_)for glob"*"'

All that beauty in such a simple statement... *wanders off*

Cheers, Sören

(hooked on the Perl Programming language)


Comment on Re: Get File Permission
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042724]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2015-07-06 18:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls