LoginSignup
0
0

More than 1 year has passed since last update.

Linux—ファイル権限を確認する ( stat -c %a ) ( stat -f %OLp )

Last updated at Posted at 2018-08-19

GNU版とBSD版でかなり stat の使い勝手が違う様子。

GNUの例

$ stat -c '%a' example.sh
755

BSDの例

$ stat -f %OLp example.sh
755

FreeBSD find the chmod numerical value for a file or directory - nixCraft

Macの場合

GNU の stat を入れてaliasを貼っておいても良い。

brew install gnu-stat
alias stat=gstat

Ref

Links

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0