Hardware & structure
-
sndconfig setup sound car
scsi_info display the scsi info
/proc/scsi cat to view the scsi info
SCSI ID start from 0
pnpdump > /etc/isapnp.conf detect the isa pnp info
vi /etc/isapnp.conf
isapnp /etc/isapnp.conf
isapnp set up the isa pnp
lspci display the pci info
cat /proc/pci
setserial -v /dev/ttyS0 spd_vhi (115) set moden serial port
setserial -gb /dev/ttyS?
usbmodules --device /proc/bus/usb/001/001 list usb kernel module
usb-uhci: Intel, PiZX4,ViA (U are VIP)
usb-ohci: Compaq, IMacs, Opti, SiS, Ali =Cisco A+
ehci-hcd,ohci-hcd,uhci-hcd
/etc/usbmgr
/etc/hotplug
-
Linux instal and Package management
-
ldd
ldd 'which ls` #show the executable ls use which lib
vi /etc/ld.so.conf #append the /usr/local/lib
ldconfig #turn the /etc/ld.so.conf --> /etc/ld.so.cache
LD_LIBRARY_PATH #the environmental var of lib path
setenv LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib
export LD_LIBRARY_PATH:/usr/local/lib
rpm -i install -e erase -q query -qf file -qd doc -qi info -qc config -V verify --checksig signature
/etc/rpmrc

/usr/lib/rpm/*

grep : rpm -qa|grep glibc
alien alien -i :transfer and install the non-deb pkg, then remove original on debien OS
dselect debien-support the interactive screen for user to select the command
apt-get from package dep db, automatic upgrade,instatll, or remove pkg
dpkg
apt-get install apache
apt-get remove apache
apt-get update update the /etc/apt/sources.lst
atp-get upgrade upgrade all the installed pkg
/etc/apt/sources.lst #include the url of source site
dpkg -i install -r remove -s -P totally remove -L list file -s query
-
GNU & Unix command
-
echo #display text
env #display the env var
export #set shell var to env var
pwd #display working directory
set #show all the var and its value
unset #remove the var unset i
exec #after exec then give the exec control

?
cut #cut input txt $cut -d ":" -f 1,3 /etc/group
cat #read the STDINP then redirect to the STD output
tac #the same of cat but first in last out
head #print the head part $head -5 myfile
tail #print the tail part
expand # expand the tab to space
unexpand #change the space to tab
fmt #format the file $fmt -w 100 fileA > fileB
join #join the same part of files
paste #combline the lines of files
nl #insert the number of line
od #view the binary file 歐弟
strings #view the strings in the binary file
pr #format the file to print
split # split file !!! no e
split -l 50 psitemp.txt psiseg
psitemp.txt 為原始檔案被哥的 -l為幾行
wc #word count $wc -l count the lines
tr #change char $cat testtr | xargs echo | tr ' ' + |bc
sed #use commands to edit txt $sed 's/:[^:]*:/:---:/' /etc/passwd | less
sort #sorting the file $sort -n
uniq #erase the double line in a file $uniq file1
sh /u/acucobol/ftpEfiles.sh
vi /u/acucobol/ftpEfiles.sh
more /u/acucobol/ftpEfiles.sh
echo > /u/usms/data/fhtr/ftpfile.txt
date >> /home/utla/ftpfile.txt
ls -la /u/usms/data/fhtr/E*[!M].BH[1234567890] >> /home/utla/ftpfile.txt
ls -la /u/usms/data/fhtr/EFTUM* >> /home/utla/ftpfile.txt
more /home/utla/ftpfile.txt
ls -la *.l*|cut -c 45-51,57-