Is there a Linux command or a series of commands that will allow me to get the file permissions in octal format (e.g. 0644)?
Try stat (1)
stat -c 0%a /etc/passwd
From unix.com: screen resolution in octal format :
perl -e 'printf "%o\n", (stat shift)[2] & 07777' filename
fstat , st_mode .
fstat
"stat" ( ), fstat (. "man 2 stat" )
OSX:
$ stat -f %p myfile 100644
:
$ stat -f %Lp myfile 644
Source: https://habr.com/ru/post/1780955/More articles:Migrating from C # to VB.NET - Resources? - c #PHP PDO SQL Server Select a statement that does not replace question marks - phpiPhone: how to determine if an instance of EKEvent can be changed? - objective-conTouchEnd not working for Android Froyo 2.2? - javascriptIs there a processor / plugin that provides Java support for referential transparency, immutabiliyt, etc.? - javaMySql if Then in Select Statement - mysqlDjango "through" model iteration - django? ver = в конце include - есть ли технический эффект? - javascriptWhy does the rendering method change the path for a unique resource after editing? - ruby-on-railsKRL response processing - krlAll Articles