66件ヒット
[1-66件を表示]
(0.078秒)
ライブラリ
- ビルトイン (36)
- pathname (12)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- File (12)
-
File
:: Stat (24) - Pathname (12)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
検索結果
先頭5件
-
File
:: Stat # uid -> Integer (21114.0) -
オーナーのユーザIDを返します。
...オーナーのユーザIDを返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.uid #=> 0
//}... -
File
:: Stat # setuid? -> bool (9107.0) -
setuidされている時に真を返します。
...setuidされている時に真を返します。
//emlist[][ruby]{
Dir.glob("/bin/*") {|bd|
if File::Stat.new(bd).setuid?
puts bd
end
}
#例
#...
#=> /bin/ping
#=> /bin/su
#...
//}... -
File
# chown(owner , group) -> 0 (9031.0) -
ファイルのオーナーとグループを変更します。
...ます。
@raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例][ruby]{
File.open("testfile") { |f| f.chown(502, 1000) } # => 0
File.stat("testfile").uid # => 502
File.stat("testfile").gid # => 1000
//}
@see File.chown... -
Shell
# setuid?(file) -> bool (6208.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid?... -
Shell
:: CommandProcessor # setuid?(file) -> bool (6208.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid?... -
Shell
:: Filter # setuid?(file) -> bool (6208.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid?... -
Pathname
# chown(owner , group) -> Integer (41.0) -
File.chown(owner, group, self.to_s) と同じです。
...File.chown(owner, group, self.to_s) と同じです。
@param owner オーナーを指定します。
@param group グループを指定します。
//emlist[例][ruby]{
require 'pathname'
Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.ui......d # => 502
//}
@see File.chown, File#chown...