メモ

ただのメモですが何か?
~ Thursday, January 14 ~
Permalink

linux - find

=find path expression action

options
<
—検索条件—
-name filename .. 指定したファイル名にマッチするファイルを検索する。
-perm num .. 許可属性がnum(8進数)と一致するファイルを検索する。(-numと指定するとnumを含むファイルを検索する)
-type c .. 指定したファイルタイプのファイルを検索。
-user user .. 指定した所有者のファイルを検索。
-group group .. 上と大体同じ
-size n .. 指定サイズのファイルを検索(1ブロック512Byte)
-atime n .. n日前に最終アクセスがあったファイルを検索。
-mtime n .. n日前に最終更新のファイルを検索
-empty .. 空のファイル、ディレクトリを検索。
—アクション—
-print .. 検索結果をフルパスで出力する。
-ls .. 検索結果を ls -glids したのと同じ内容で出力する。
-exec command \; .. 検索結果を使用し、コマンドを実行する。

—演算子—
 !expr .. exprが異なる場合、検索対象になる。
expr1 -and expr2 .. expr1と、expr2が共に真の場合検索対象になる。
expr1 -or expr2 .. expr1か、expr2の何れかが真なら検索対象になる。
>
使用例
<
#カレントディレクトリ以下にある*.phpを検索(カレントディレクトリから一つ子供のディレクトリまで降りて検索する)
$ find . -maxdepth 2 -name “*.php” -ls

Tags: linux find コマンド
~ Thursday, December 18 ~
Permalink

Subversionインストール - [CentOS4.6, svn]

■CentOS 4.6にsubversionをインストールした時のメモ
yumも併せてインストール・・・

mkdir yum-2.4.3-4
cd yum-2.4.3-4
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm                    \n
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm                 \n
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.`uname -i`.rpm \n
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.`uname -i`.rpm             \n
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.`uname -i`.rpm
wget http://mirror.centos.org/centos/4.6/os/`uname -i`/CentOS/RPMS/sqlite-3.3.6-2.`uname -i`.rpm
rpm —import http://mirror.centos.org/centos/4.6/os/`uname -i`/RPM-GPG-KEY-centos4
rpm -ivh *.rpm

Tags: centos linux svn subversion