2007年9月16日 星期日

117-101 pass

date -%M M是分 m 是月份
就記得這題錯....

2007年8月3日 星期五

補補補

3072
2(lvm quota) 3 9
3073
dns samba 反而實做過兩次 比較了解基本的
man 應都生的出答案(誤)
3073
9-3 tar 9-6 rsync

2007年8月2日 星期四

find 重點

find - search for files in a directory hierarchy

-name pattern
Base of file name (the path with the leading directo-
ries removed) matches shell pattern pattern. The
metacharacters (‘*’, ‘?’, and ‘[]’) match a ‘.’ at the
start of the base name (this is a change in findu-
tils-4.2.2; see section STANDARDS CONFORMANCE below).
To ignore a directory and the files under it, use
-prune; see an example in the description of -whole-
name. Braces are not recognised as being special,
despite the fact that some shells including Bash imbue
braces with a special meaning in shell patterns. The
filename matching is performed with the use of the
fnmatch(3) library function. Don’t forget to enclose
the pattern in quotes in order to protect it from
expansion by the shell.

-type c
File is of type c:

b block (buffered) special

c character (unbuffered) special

d directory

p named pipe (FIFO)

f regular file

l symbolic link; this is never true if the -L
option or the -follow option is in effect,
unless the symbolic link is broken. If you want
to search for symbolic links when -L is in
effect, use -xtype.

2007年8月1日 星期三

惱人的apache

Main host goes away

If you are adding virtual hosts to an existing web server, you must also create a block for the existing host. The ServerName and DocumentRoot included in this virtual host should be the same as the global ServerName and DocumentRoot. List this virtual host first in the configuration file so that it will act as the default host.


htpasswd - Manage user files for basic authentication
-c Create the passwdfile.

-D Delete user.

2007年7月25日 星期三

rpm補遺

rpm {-e|--erase}
rpm {-K|--checksig}
rpm {-F|--freshen}

2007年7月24日 星期二

cron & tab

If the cron.allow file exists, then you must be listed therein in order
to be allowed to use this command. If the cron.allow file does not
exist but the cron.deny file does exist, then you must not be listed in
the cron.deny file in order to use this command. If neither of these
files exists, only the super user will be allowed to use this command.

deny$ deny 結尾
^at at 開頭

2007年7月23日 星期一

考NCLP

http://www.suse.idv.tw/viewtopic.php?t=273&postdays=0&postorder=asc&start=30&sid=744361da8ee0f51d46591609a6dc9c03

http://blog.sh47.com/study/article.asp?id=26
http://suse.lccnet.com.tw/modules/newbb/viewtopic.php?topic_id=341&forum=3

passwd相關

/etc/default/passwd
/etc/login.defs

sudoer

#Defaults targetpw # ask for the password of the target user i.e. root
#ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!


targetpw If set, sudo will prompt for the password of the user specified by the -u flag (defaults to root) instead of the password of the invoking user. Note that this precludes the use of a uid not listed in the passwd database as an argument to the -u flag.

2007年7月20日 星期五

pam

cat /etc/pam.d/login
#%PAM-1.0
auth required pam_securetty.so
auth include common-auth
auth required pam_nologin.so
account include common-account
password include common-password
session include common-session
session required pam_lastlog.so nowtmp
session required pam_resmgr.so
session optional pam_mail.so standard

/etc/securetty
修改
#tty2 加上# -------->root 無法從tty2登入

lvm

#lvcreate -L 80M -i 2 -n striplv vg00 <建立等量 LV , -i 使用兩個 PV>
#lvdisplay /dev/vg00/striplv <觀察 LV>
#pvdisplay /dev/hda7 <觀察 PV>
#pvdisplay /dev/hda8 <觀察 PV>
#lvdisplay /dev/vg00/lv00 <觀察 LV>
#lvextend -L +20M /dev/vg00/lv00 <線上擴充 LV>
#lvdisplay /dev/vg00/lv00 <觀察 LV>
#df -h <查看分割區的掛載情形, -h 人類可閱讀的方式>
#ext2online /dev/vg00/lv00 <使其生效>

2007年6月11日 星期一

安裝瑣事

nohpet 參數 是安裝/進入 fedora 6 7 不可少的

vmware 安裝 似乎不需裝 client ?!
但是 kernel-devel 及相對應的kernel編號很重要
以及 xineted 要裝

2007年5月29日 星期二

lx02 linux power user textbook 20070520-2

touch mylog`date +%d`
date +%D (%F %T)



cal
cal -3 ; cal 3 2009 ; -y
(前後共三個月) (整年)

w ; who
(data from /var/run/utmp)

finger finger name
chfn -- change finger info

write ; wall ; talk write name
(broadcast to all)
mesg y/n

history n號指令 !n !! (前一個指令)

vlock (lock terminal) (-a)
(fedora 6 好像沒有了)


2007年5月21日 星期一

lx02 linux power user textbook 05202007

lx02 linux power user textbook
這本是一組12000元的書的第一本
e某找不到

MBR: Portition Table first 512K

primary/extend disk 只能1~4 也就是hda1....hda4
as the tme time, Logical disk from 5 to 16/63
extened partition holds THREE logical

Command: service network restart network service restart as it decribes :)

磁碟分割範例
{ /boot 100mb
{ / 4gb
{ /home 500mb
{ /var 2gb
{ swap 256mb

dd if=/media/images/diskboot.img of=/dev/sda
指令是讓sda (一個usb碟 可以當成開機 使用小小的隨身碟就好了)

ls --help (跟man ls 看到差不多)
ls -alih
id

passwd mkpasswd
echo "RealPassword" | passwd -- stdin Name (改密碼指輸入一次的方法)

useradd

date `` 命令代換