Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Teeのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Tee
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{Lowercase title}} [[Category:コマンド]] [[Wikipedia:tee (command)|Wikipedia]] より: :コンピュータでは、tee は標準ストリームを使用するコマンドラインインタプリタ(シェル)のコマンドで、標準入力を読み込んで標準出力と 1 つ以上のファイルの両方に書き込み、入力を効果的に複製するものです。主にパイプやフィルタと組み合わせて使用される。コマンド名は、配管工事で使用される T 字分岐にちなんで付けられた。 == Installation == {{man|1|tee}} is part of the {{Pkg|coreutils}} package. == Usage == To write content to files: $ ''input stream'' | tee ''file1 file2...'' By default, tee overwrites content in files when used again. However, if you want, you can append content in files by using the {{ic|-a}}/{{ic|--append}} argument. For more usage, see {{man|1|tee}}. == Tips and tricks == === Write to protected files === tee is very useful for writing to protected files: $ ''input stream'' | sudo tee ''--option'' ''protected file1 protected file2...'' when a simple {{ic|>}}/{{ic|>>}} would not have worked because of permissions. === Vim === Similar concept is useful when you forgot to start [[Vim]] with [[sudo]] when editing a configuration file owned by {{ic|root}}. In this case you can do the following inside [[Vim]] to save the file: :w !sudo tee % You can add this to your {{ic|~/.vimrc}} to make this trick easy-to-use with {{ic|:w!!}} mapping in command mode: {{hc|~/.vimrc|2= " Allow saving of files as sudo when I forgot to start vim using sudo cmap w!! w !sudo tee > /dev/null % }} The {{ic|> /dev/null}} part explicitly throws away the standard output since we do not need to pass anything to another piped command. More detailed explanation of how and why this works can be found in [https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work How does the vim “write with sudo” trick work?] article on StackOverflow. == See also == * [https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html tee info]
このページで使用されているテンプレート:
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Lowercase title
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
Tee
に戻る。
検索
検索
Teeのソースを表示
話題を追加