アプリ版:「スタンプのみでお礼する」機能のリリースについて

表題の方法をコマンドで実現する場合、どういったコマンドが該当するでしょうか?
検索サイトで検索したのですが、所望のものが見つかりませんでした。
ご存知の方、どうかよろしくお願いします。

A 回答 (3件)

↓のようなでもいいのかな?



○CentOS 5.2
[lean@brynhildr ~]$ cat /etc/redhat-release
CentOS release 5.2 (Final)
[lean@brynhildr ~]$ stat --version
stat (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

作者 Michael Meskes.
[lean@brynhildr ~]$ echo 'test' > text
[lean@brynhildr ~]$ ls -l text
-rw-rw-r-- 1 lean lean 5 10月 11 17:23 text
[lean@brynhildr ~]$ stat text
File: `text'
Size: 5 Blocks: 16 IO Block: 4096 通常ファイル
Device: fd00h/64768d Inode: 1507337 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 500/ lean) Gid: ( 500/ lean)
Access: 2008-10-11 17:12:53.000000000 +0900
Modify: 2008-10-11 17:23:16.000000000 +0900
Change: 2008-10-11 17:23:16.000000000 +0900
[lean@brynhildr ~]$ stat --format='%A %a' text
-rw-rw-r-- 664
[lean@brynhildr ~]$ stat --format='%A %h %U %G %s %y %n' text
-rw-rw-r-- 1 lean lean 5 2008-10-11 17:23:16.000000000 +0900 text
[lean@brynhildr ~]$ stat --format='%a %h %U %G %s %y %n' text
664 1 lean lean 5 2008-10-11 17:23:16.000000000 +0900 text
[lean@brynhildr ~]$
    • good
    • 0
この回答へのお礼

statコマンドで希望の処理が叶いました。
ありがとうございました。

お礼日時:2008/10/13 11:12

ls -l で、rw-r--r-- となる場合に、644 と表示したいわけですよね。



コマンド一発というのは無さそうな気がします。
C,Perl等で書くか、シェルスクリプトでtestをつかってごりごり書くか、ls -l の結果を場合分けして書くか。
    • good
    • 1

これがわかりやすいかと思います。



ファイルパーミッション
http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1% …
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!