Last active
August 29, 2015 14:16
-
-
Save itsthatguy/dd510df1a275723d8825 to your computer and use it in GitHub Desktop.
Shows octal permissions for 'path(s)'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Shows octal permissions for 'path(s)' | |
| # | |
| # example: | |
| # $ octal /usr/local/foo myfile myotherfile | |
| # 0644 /usr/local/foo | |
| # 0500 myfile | |
| # 0666 myotherfile | |
| # OSX | |
| alias octal="stat -f '%Mp%Lp %N' $*" | |
| # Linux | |
| alias octal="stat -c '0%a %n' $*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment