フォルダの中身をツリー構造で表示する方法

TREE /F

現在のディレクトリ以下のディレクトリがツリー表示されます。

中身がたくさんあるとコマンドプロンプトに表示しきれない、というか見るのにうざいのでテキストに書き出すと見やすくなる。

こんな感じ!

TREE /F > tree.txt

テキストファイルにパスを付けないとコマンドを実行した場所にtree.txtが出力されます。

yum update中にctrl+cでupdateを中断したために、二回目のyum updateでパッケージの競合がおきた。


○こんな感じ
file /usr/sbin/avcstat from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/getenforce from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/getsebool from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/matchpathcon from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/selinuxenabled from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/setenforce from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/togglesebool from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/avcstat.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/booleans.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/getenforce.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/getsebool.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/matchpathcon.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/selinux.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/selinuxenabled.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/setenforce.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/togglesebool.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5

Error Summary

                        • -


解消するために、重複するパッケージを除去した。


package-cleanupをつかうためにyum-utilsをインストール
[root@localhost ~]# yum install yum-utils


ダブったパッケージの除去
[root@localhost ~]# package-cleanup --cleandupes

このあとのyum updateでエラー解消を確認できた。


・接続数確認
select count(*) from v$session;


・オープンカーソル数確認
SHOW PARAMETER OPEN_ CURSORS;

・オープンカーソル数変更
ALTER SYSTEM SET OPEN_ CURSORS=***;



Oracleに設定している現在の最大同時接続数
SELECT name, value FROM v$parameter WHERE name = 'processes';


・リソースのパラメータ設定値や使用状況を示す
select count(*) from v$resource_limit;

sendmailの設定変更をm4で行うときに
# m4 sendmail.mc > sendmail.cf
sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory
とエラーが出たら、sendmail-cfとsendmail-develをインストールする。

# yum install sendmail-cf
# yum install sendmail-devel

もう一度m4を実行してエラーが出なければOKです。
# m4 sendmail.mc > sendmail.cf

MySQLのサーバにクライアントからリモートアクセスする方法。

1.クライアントとサーバ両方にMySQLをインストールします。
2.サーバ側で、二つのユーザを作成します。

・ローカル向け
grant all privileges on DB名.* to ユーザ名@localhost identified by 'パスワード' with grant option;
リモートホスト向け
grant all privileges on DB名.* to ユーザ名@'%' identified by 'パスワード' with grant option;



ところが、どうやってもクライアントからサーバにつなげることができず、どはまりしました。



【確認したこと】
1・MySQLのポートは開いているか

# netstat -tlpn|grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 14306/mysqld

クライアント、サーバ両方で実行したけどポートは開いていた。
ローカル以外のホストからも受け入れられるようになっている。


2・ファイアーウォールでフィルタされていないか。

# iptables -vnL

このコマンドを実行したら、サーバ側で3306のポートが開いていなかった。。。。

ルールを変更して無事開通!

1.postgresにログイン
$ psql postgres-db


Welcome to psql 8.0.4, the PostgreSQL interactive terminal. ← ここでも大概が分かる

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit


2.SQL実行
postgres-db=# SELECT version(); ←これを実行
version

                                                                                                                                                                                                    • -

PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
(1 row)