Vimスクリプト(getfperm)

テキストエディタ(Vimやその他)
TVアニメ「慎重勇者〜この勇者が俺TUEEEくせに慎重すぎる〜」本PV

アニメ『慎重勇者~この勇者が俺TUEEEくせに慎重すぎる~』

腹筋でレベル上げって斬新。たいていのRPGゲームやる時って、かなりレベル上げしてからボス的に挑むと思うんですけど、このアニメの勇者もそんな感じ。全然普通に見えます。慎重に鍛えるのが当たり前。逆にリスタとかいう女神が馬鹿すぎです。でも、それがいい。慎重勇者がボケ担当で、馬鹿女神のツッコミが面白いアニメですね。笑うと悔しいのですが、時々吹き出します。

getfperm使います。

         
getfperm({fname})                                       *getfperm()*
                The result is a String, which is the read, write, and execute
                permissions of the given file {fname}.
                If {fname} does not exist or its directory cannot be read, an
                empty string is returned.
                The result is of the form "rwxrwxrwx", where each group of
                "rwx" flags represent, in turn, the permissions of the owner
                of the file, the group the file belongs to, and other users.
                If a user does not have a given permission the flag for this
                is replaced with the string "-".  Examples:
                        :echo getfperm("/etc/passwd")
                        :echo getfperm(expand("~/.vimrc"))
                This will hopefully (from a security point of view) display
                the string "rw-r--r--" or even "rw-------".

                For setting permissions use |setfperm()|.

/tmp $ ls -l test1.txt
-rw-r--r--  1 takk            wheel  5 10 19 20:23 test1.txt
/tmp $ 


一致しますね。

/tmp $ chmod 444 test1.txt
/tmp $ ls -l test1.txt
-r--r--r--  1 takk            wheel  5 10 19 20:23 test1.txt
/tmp $ 

リードオンリーに変更しました。

一致しました。
戻しておきます。

/tmp $ chmod 644 test1.txt
/tmp $ ls -l test1.txt
-rw-r--r--  1 takk            wheel  5 10 19 20:23 test1.txt
/tmp $ 

っていうか戻せるんですね。

コメント

タイトルとURLをコピーしました