顯示文章

這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。


主題 - hsiao_peter

頁: [1]
1
程式討論版 / find ....tar
« 於: 2012-01-09 18:46 »
作業系統 AIX 4.3 
Usage: tar -{c|r|t|u|x} [-BdFhilmopsvw]
           [-Number] [-fFile]
           [-bBlocks] [-S [Feet] [Feet @Density] [Blocksb]]
           [-LInputList] [-NBlocks] [-C Directory] File ...
不能做 -T  --exclude 也沒辦法
---------------------------------------------
[kckd]#/home1>find /home1/futures/. -type f | grep -v "/logs/"|tar -T - -cvf `hostname`-`date '+%Y-%m-%d'`.tar                               
tar: Not a recognized flag: T
Usage: tar -{c|r|t|u|x} [-BdFhilmopsvw]
           [-Number] [-fFile]
           [-bBlocks] [-S [Feet] [Feet @Density] [Blocksb]]
           [-LInputList] [-NBlocks] [-C Directory] File ...

我要把  /home1/futures  的 logs目錄 exclude
用這個 -o name 會把所有的撈出來
[kckd]#/home1>cd futures
[kckd]#/home1/futures>
[kckd]#/home1/futures>find /home1/futures -type d \( -name logs \)|more
/home1/futures/web/cert_cgi/logs
/home1/futures/maintain/logs
/home1/futures/bin/pre_send/logs
/home1/futures/bin/pre_send_old/logs
/home1/futures/logs
這不是我要的
唯一可用的是  grep -v
find /home1/futures/. -type f | grep -v "/logs/"| xargs  tar cvf 123.tar -
可以但好像少很多
find -path './logs' -prune -o -print|cpio -pdmvl /home/ftrade 1>/dev/null 2>>/tmp/backup.log  這個linux OK AIX不行
[kckd]#/home1/futures>find -path './logs' -prune -o -print|more
Usage: find Path-list [Expression-list]

請問各位先進有沒方法



謝謝!!


2
Virtualization 虛擬化技術 / OpenVZ
« 於: 2008-02-19 19:48 »
這一套較少人討論 效能應該是最好
我用CenTOS 5 已經架設成功大家可以一起討論
http://wiki.openvz.org/

3
程式討論版 / compile subversion-1.4.5
« 於: 2007-12-05 17:59 »
大家好請問一下我的OS 版本為 Redhat AS3 update4
我要compile subversion-1.4.5 時出現 問題 問題如下
-----------------------
checking perl version... 5008000
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tools/backup/hot-backup.py
config.status: creating contrib/client-side/svn_load_dirs.pl
config.status: creating contrib/client-side/svncopy.pl
config.status: creating contrib/client-side/testsvncopy.pl
config.status: creating tools/hook-scripts/commit-access-control.pl
config.status: creating tools/hook-scripts/commit-email.pl
config.status: creating subversion/bindings/swig/perl/native/Makefile.PL
config.status: creating packages/solaris/pkginfo
config.status: creating subversion/svn_private_config.h
config.status: subversion/svn_private_config.h is unchanged
config.status: executing mkdir-init commands
configure: WARNING: we have configured without BDB filesystem support


You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.  We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end.  You can find the latest version of
Berkeley DB here:
  http://www.sleepycat.com/download/index.shtml

我查了下 db版本
 [root@ntophp subversion-1.4.5]# rpm -qa|grep db
gdbm-1.8.0-20
libdbi-0.6.5-5
db4-utils-4.1.25-8
db4-4.1.25-8
nss_db-2.2-20.4
compat-db-4.0.14-5.1
db4-devel-4.1.25-8
gdbm-devel-1.8.0-20
gdb-6.1post-1.20040607.52
rpmdb-redhat-3-0.20041216
compat-pwdb-0.62-3
libdbi-dbd-mysql-0.6.5-5

db4-4XX   db4-develXX 都有裝阿 為什麼會找不到
Many THX!!

4
Linux 討論版 / postfix+tls
« 於: 2007-06-25 17:45 »
Postfix mail_version = 2.1.5
Cyrus-sasl = 2.1.19-12.1.10
tls = libgnutls11-1.0.23-2.2.102mdk

telnet debug時
[root@ns1 mail]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.dunmill.com.tw ESMTP Postfix
EHLO localhst
250-mail.xxx.com.tw
250-PIPELINING
250-SIZE 8192000
250-ETRN
250-STARTTLS
250 8BITMIME

為何沒有 250-AUTH NTLM LOGIN PLAIN ....
            250-XVERP
這行...
謝謝!!

5
DESCRIPTION:(from Secunia Security  Advisory)
Howard Chu has reported a security issue in OpenLDAP, which can be
exploited by malicious users to bypass certain security
restrictions.

The security issue is caused due to an error within the Access
Control List processing. If a user has "selfwrite" access to an
attribute, this can be exploited to modify arbitrary values of the
attribute.

CRITICAL:
Less critical

IMPACT:
Security Bypass

Software:   OpenLDAP 2.3.x (受影響的)

SOLUTION:
Update to version 2.3.25.

文自 http://secunia.com/advisories/21721/


有使用的人快升級

6
Linux 討論版 / 控制遠端螢幕(已解決!!!)
« 於: 2006-07-27 14:33 »
Dear ALL
請問 x-window有沒辦法 執行遠端的 程式把螢幕指向 自己這邊
因為遠端螢幕故障 謝謝!!

7
Linux 討論版 / Extend striped LV
« 於: 2006-06-28 16:51 »
LVM2 系統 Redhat ES4
請問我在 LV上做striped (沒跨VG) 後 發覺空間不夠用 如何增加空間到
LV?用 lvextend有錯誤
以下
root@ntop ntop]# /usr/sbin/vgdisplay
  --- Volume group ---
  VG Name               ntopvg
  System ID
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                256
  Cur LV                1
  Open LV               1
  Max PV                256
  Cur PV                4
  Act PV                4
  VG Size               5.70 GB
  PE Size               4.00 MB
  Total PE              1458
  Alloc PE / Size       249 / 996.00 MB
  Free  PE / Size       1209 / 4.72 GB
  VG UUID               mRs9V7-thO3-XLx9-cB3w-cyaS-TcJ3-w0X4VL

[root@ntop spymantw]# /usr/sbin/lvextend -L +4000 /dev/ntopvg/ntoplv /dev/sda9
  Using stripesize of last segment 8KB
  Rounding size (1249 extents) down to stripe boundary size for segment (1248 extents)
  Extending logical volume ntoplv to 4.88 GB
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.

謝謝!!

8
Linux 討論版 / 如何擋mxie封包
« 於: 2006-05-05 17:18 »
用NAT 架構 內部 192.168.1.0/25用 masq + 透通性squid proxy 架構
有人反應 會突然 網路中斷 msn跳掉  瀏覽器 internet不通  
可是有不是全部都會

eth0      Link encap:Ethernet  HWaddr 00:E0:18:BA:6F:87
          inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.240
          inet6 addr: fe80::2e0:18ff:feba:6f87/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64176815 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68109193 errors:96 dropped:0 overruns:0 carrier:97
          collisions:9311544 txqueuelen:1000
          RX bytes:2064660042 (1969.0 Mb)  TX bytes:1182036843 (1127.2 Mb)
          Interrupt:19 Base address:0x8800

eth1      Link encap:Ethernet  HWaddr 00:04:76:E4:B6:5E
          inet addr:211.75.X.X  Bcast:211.75.X.X  Mask:255.255.255.248
          inet6 addr: fe80::204:76ff:fee4:b65e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:107215170 errors:1 dropped:0 overruns:96695 frame:1
          TX packets:98475904 errors:0 dropped:0 overruns:0 carrier:174
          collisions:893151 txqueuelen:1000
          RX bytes:2390193399 (2279.4 Mb)  TX bytes:2182866179 (2081.7 Mb)
          Interrupt:19 Base address:0x8400
這是網路介面卡情形   發現 collisions 很高 是不是網路實體有問題? (中華電信已換過大樓線路跟ADSL)
又發現有人用 p2p軟體 mxie  請問要如何擋掉 mxie封包 ?
THX

9
Linux 討論版 / linux wireless lan chips Directory
« 於: 2006-04-12 14:29 »
偶而瀏覽blog看到
給有需要的人使用
http://linux-wless.passys.nl/ :lol:

10
我是用postfix 請問各位大大 可以做到鎖定某些人固定 限制 幾個domain的收發信嘛?
謝謝!!

11
Linux 討論版 / 突然轉不過來
« 於: 2005-10-18 16:01 »
請教一下 大大
這個檔案結構  的含義

drwxr-sr-x   8 netscape netscape     512 Oct 29 2004  https-ebrkweb1

s在group的x  是不是指 group 有root 執行權限

數字表現  1755?
 :roll:

12
Linux 討論版 / 討厭的垃圾信
« 於: 2005-09-27 08:36 »
最近的垃圾信推陳出新
就像這樣 前面有人討論過 不過用的是postfix 我是sendmail
j8QIqwO0015003     3389 Tue Sep 27 02:52 MAILER-DAEMON
                 (Deferred: Connection refused by mail.eleanoreleanor.com.)
                                         <aabkm.aabkm@eleanoreleanor.com>
j8QIpKLw014989     9298 Tue Sep 27 02:51 MAILER-DAEMON
                 (Deferred: Connection refused by mail.brentbrent.com.)
                                         <aabgl.aabgl@brentbrent.com>
j8QIqxw7015005      780 Tue Sep 27 02:52 <>
                 (Deferred: Connection refused by mail.eleanoreleanor.com.)
                                         <aabkm.aabkm@eleanoreleanor.com>
j8Q3Y9YE005880        0 Mon Sep 26 11:34 MAILER-DAEMON
                 (Deferred: Connection timed out with mail.benqbenq.com.)
                                         <aaebg.aaebg@benqbenq.com>
這是mailq  
雖然我用mailscaner 有成功標示 ***SPAM***
不過數量很多 被退信後查無此人 queue會放在 /var/spool/queue

我原先在/etc/mail/access用 ip擋 不過未見效果

218.32.211.18                   DISCARD
61.31.235.245                   DISCARD
218.63.92.208                   DISCARD
makemap -r hash /etc/mail/access.db < /etc/mail/access

後來想到了用表頭擋 由於是使用sendmail  所以只好用 procmail
From aahe.aahes@carinacarina.net  Tue Sep 27 06:33:43 2005
這是出現在/var/log/procmail.log
所以我設了一下
/etc/procmailrc

:0 hwc
* ^From:.*"aa...\.aa...@*"
/dev/null

:0 hwc
* ^From:.*aa*\.aa*@*
/dev/null
還是沒用  不知有沒其他方式可以擋  謝謝!!

13
請個位幫幫忙
我的環境
  postfix2.1.5+Cyrus2.1.19   是Mandrake 2005 limited 版
只要打開  smtpd_sasl_auth_enable = yes postfix就掛!!

postconf -n

alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
delay_warning_time = 4h
html_directory = /usr/share/doc/postfix-2.1.5/html
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $mydomain, localhost
mydomain = dunmill.com.tw
myhostname = mail.dunmill.com.tw
mynetworks = 127.0.0.1/8,192.168.1.14/28,211.75.206.104/29
mynetworks_style = subnet
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
recipient_delimiter = +
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrakelinux)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 450

smtpd.conf
[root@ns1 postfix]# cat /usr/lib/sasl2/smtpd.conf
pwcheck_method : saslauthd
mech_list:plan login
[root@ns1 postfix]# ps aux |grep sasl
root      2255  0.0  0.2   4252  1160 ?        Ss   00:45   0:00 saslauthd -a shadow
root      2256  0.0  0.2   4252  1160 ?        S    00:45   0:00 saslauthd -a shadow
root      2260  0.0  0.2   4252  1160 ?        S    00:45   0:00 saslauthd -a shadow
root      2261  0.0  0.2   4252  1160 ?        S    00:45   0:00 saslauthd -a shadow
root      2262  0.0  0.2   4252  1160 ?        S    00:45   0:00 saslauthd -a shadow
root     28667  0.0  0.0   1780   416 pts/1    R+   02:30   0:00 grep sasl
[root@ns1 postfix]# service saslauthd start
正在開始 saslauthd                                              [ 成功 ]
Creating hardlink from /var/lib/sasl2/mux to /var/spool/postfix/var/lib/sasl2
[root@ns1 postfix]# ls -al /var/lib/sasl2
drwxr-xr-x   2 root root 160  5月 13 00:45 ./
drwxr-xr-x  22 root root 640  5月 10 09:43 ../
srwxrwxrwx   2 root root   0  5月 13 00:45 mux=
-rw-------   1 root root   0  5月 13 00:45 mux.accept
-rw-------   1 root root   5  5月 13 00:45 saslauthd.pid

master.cf 以經改過

smtp    inet    n       -       n       -       -       smtpd
#smtps    inet  n       -       n       -       -       smtpd

14
[root@www mail]# /usr/sbin/useradd -M -s /bin/false -g 103 Office
useradd: invalid user name 'Office'
請問有解嗎          謝謝!!

頁: [1]