Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-alpha1
-
None
-
Reviewed
-
Added permissions to the fs stat command. They are now available as symbolic (%A) and octal (%a) formats, which are in line with Linux.
Description
This patch adds to fs/shell/Stat.java the missing options of %a and %A.
FileStatus already contains the getPermission() method required for returning symbolic permissions. FsPermission contains the method to return the binary short, but nothing to present in standard Octal format.
Most UNIX admins base their work on such standard octal permissions. Hence, this patch also introduces one tiny method to translate the toShort() return into octal.
Build has already passed unit tests and javadoc.
Attachments
Attachments
Issue Links
- depends upon
-
HDFS-10892 Add unit tests for HDFS command 'dfs -tail' and 'dfs -stat'
- Resolved