ユーザ用ツール

サイト用ツール


os:ubuntu:basic_operation

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
os:ubuntu:basic_operation [2020/12/10 06:27]
michiya [ファイル検索]
os:ubuntu:basic_operation [2021/01/09 14:37] (現在)
行 41: 行 41:
 $ find `pwd` -name hoge.txt $ find `pwd` -name hoge.txt
 </code> </code>
 +
 +====== 特定の文字列を含むファイルの検索 ======
 +
 +<code>
 +$ find <dir> -type f -print | xargs grep <str>
 +</code>
 +
 +<dir>は検索するディレクトリ,<str>は検索したい文字列.
 +
 +====== 圧縮,解凍 ======
 +
 +圧縮,解凍 (tar.gz)
 +<code>
 +$ tar zcvf hoge.tar.gz <dir>
 +$ tar zxvf hoge.tar.gz
 +</code>
 +
 +圧縮,解凍 (tar.bz2)
 +<code>
 +$ tar jcvf hoge.tar.bz2 <dir>
 +$ tar jxvf hoge.tar.bz2
 +</code>
 +
 +圧縮,解凍 (tar.xz)
 +<code>
 +$ tar Jcvf hoge.tar.xz <dir>
 +$ tar Jxvf hoge.tar.xz
 +</code>
 +
 +
  
os/ubuntu/basic_operation.1607581669.txt.gz · 最終更新: 2021/01/09 14:37 (外部編集)