假设我有以下输出ls -l:
drwxr-xr-x 2 root root 4096 Apr 7 17:21 foo
Run Code Online (Sandbox Code Playgroud)
如何自动将其转换为使用的格式chmod?
例如:
$ echo drwxr-xr-x | chmod-format
755
Run Code Online (Sandbox Code Playgroud)
我使用的是 OS X 10.8.3。
我有一组 linux 文件夹,我需要以数字方式获取文件夹的权限。
例如在下面的目录中,我需要文件夹的权限值是什么...无论是 755、644 还是 622 等...
drwxrwsr-x 2 dev puser 4096 Jul 7 2014 fonts
Run Code Online (Sandbox Code Playgroud)