The Linux Tips HOWTO $BF|K\8lHG(B $B3{_7bCIW!!([email protected]$B!!Lu(B r 1.0.0, 1 Oct. 1996 $B85$NJ8=q$O(B The Linux Tips HOWTO Paul Anderson, [email protected] v2.0, August 1996 $B$G$9!#(B $B$3$N#H#O#W#T#O$K$O!"$"$^$jB>$G$O8+$D$+$i$J$$$h$&$J!"(BLinux $B$r$A$g$$$C$H(B $BNI$/$9$k>.%o%6$d%R%s%H$,:\$C$F$$$^$9!#(B 1. $B$O$8$a$K(B $B$h$&$3$=(B Linux Tips HOWTO $B$X!#$3$l$O(B Linux $B$,$b$C$H3Z$7$/$J$k%$%+$7$?(B $B;E3]$1!u:GE,2=K!$NJ8=q!#:#2s$O<+J,$G;W$$$D$$$?%b%N$HA0$N(B Tips-HOWTO $B$K$"$C$?J*!J@h?M$N@i3((B^H^H$BCN7C$rL5BL$K$7$A$c$!%$%+%s!K$@$1$J$s$G!"$*(B $B5$$KF~$j$N%"%I%P%$%9$d(B tips $B$,$"$C$?$i2?$G$bAw$C$F!#.Eg;090$5$s$h$j!V(BAlan Cox $B$5$s$N$3$N%"%I%l%9$O(B obsolete $B$G$9$M!#(B $B:G6a$O(B [email protected] $B$+$iEj9F$7$F$$$k$h$&$G$9!#!W(B] $B$"$k%G%#%9%/$+$iB>$N%G%#%9%/$X!"%U%!%$%k%D%j!<$r4]$4$HAGAa$/0\F0$9$kJ}K!(B (cd /source/directory && tar cf - . ) | (cd /dest/directory && tar xvfp -) $B;v8N$C$F%G%#%l%/%H%j$r%@%a$K$7$J$$$h$&$K!"(Bcd /source/directory; tar.... $B1>!9$H$$$&$b$N$+$iJQ99$7$^$7$?!#(BJim Dennis$B!"([email protected] $B$5$s!"(B $B65$($F$/$l$F$"$j$,$H$&!#!A4IM}?M(B 2.3. $B$I$N%G%#%l%/%H%j$,0lHVBg$-$$$+$rCN$k!#!A(BMick Ghazey$B!"(B [email protected] $B%&%A$N%3%s%T%e!<%?$G$I$N%G%#%l%/%H%j$,0lHVBg$-$$$N!)$C$F;W$C$?$3$H$O(B $B$"$j$^$;$s$+!)(B du -S | sort -n $B$H$9$k$HH=$j$^$9!#(B 2.4. Linux Gazette$B!J(B Linux $B?7J9!K(B Linux Gazette $B$NAOB$e2?$r4|BT$7$^$9!)(B http://www.redhat.com/lg $B$r%A%'%C%/$7$F2<$5$$!#9T$C$??M$O(B LG $B$,$I$l$[$IAG@2$i$7$$(B e-zine $B$G$"$k$+!"(B John Fisk $B$K$R$H$3$H=q$$$F2<$5$$$M!#(B 2.5. GNU Make 3.70 $B$N(B VPATH $B$^$o$j$N?6$kIq$$$rJQ$($k%Q%C%A$N$"$j$+!#(BTed Stern$B!"(B [email protected] $B$3$NLdBj$rJz$($F$k?M$,B?$$$+$I$&$+$OCN$j$^$;$s!#$,!"(BGNU Make $B$N%P!<%8%g%s(B 3.70 $B$K$O!";d$N5$$KF~$i$J$$!VFCD'!W$,$"$j$^$9!#(BVPATH $B$r@dBP%Q%9L>$GM?$($?(B $B>l9g!"$*$+$7$JF0:n$r$9$k$N$G$9!#$-$o$a$F0BDj$7$?%Q%C%A$r(B Paul D. Smith <[email protected]> $B$,Ds6!$7$F$$$^$9!#H`$O$^$?!"(BGNU Make $B$K2~JQ$,$"$k(B $BEY$K!"%K%e!<%9%0%k!<%W(B gnu.utils.bug $B$K%I%-%e%a%s%H$H%Q%C%A$rEj9F$7$F$$$^$9!#(B $B;d$O$@$$$?$$!"%"%/%;%9$9$kA4%7%9%F%`$N(B gmake $B$KH`$N%Q%C%A$rEv$F$F:F%3%s%Q%$%k(B $B$7$F$$$^$9!#(B 2.6. $B%j%V!<%H$N$?$S$K$$$A$$$A(B fsck $B$9$k$N$r$d$a$5$;$k$K$O!)(B $B!A(BDale Lutz$B!"([email protected] Q: $B%V!<%H$NEY$K(B e2fsck $B$,%G%#%9%/$r%A%'%C%/$7$^$9!#$d$a$5$;$k$K$O!)(B A: $B%+!<%M%k$r:F9=C[$9$k$H!"$=$N%U%!%$%k%7%9%F%`$O!I(Bdirty$B!I$H%^!<%/$5$l$^$9!#(B $B$*$+$2$G%V!<%H$NEY$K%G%#%9%/$,%A%'%C%/$5$l$k$h$&$K$J$C$A$c$$$^$9!#(B $B$3$l$rD>$9$K$O!"(B rdev -R /zImage 1 $B$r l9g!"4JC1$K=$@5$G$-$^$9!#(B /etc/brc $B$+(B /sbin/brc $B$G(B umount -a $B$r8F$V0JA0$N9T$K!"0J2<$r2C$($^$9!#(B mount -o remount,ro /mount.dir $B$3$N9T$r(B / $B0J30$K%^%&%s%H$9$kA4$F$N%U%!%$%k%7%9%F%`$N$?$a$K=q$-$^$7$g$&!#(B $B$3$&$9$l$P!"2?$i$+$NM}M3$G(B shutdown $B$,%W%m%;%9$N(B kill $B$K<:GT$7!"%G%#%9%/$N(B umount $B$,$G$-$J$/$F$b!"%j%V!<%H$N:]$K$O%G%#%9%/$O(B clean $B$G$9!#%j%V!<%H;~4V(B $B$r$+$J$j@aLs$7$F$/$l$F$^$9!#(B 2.8. $B%O!<%I%G%#%9%/Cf$N:GBg5i$N%U%!%$%k$r8+$D$1$k$K$O!#(B $B!A(BSimon Amor$B!"([email protected] ls -l | sort +4n $B$H$7$^$9!#(B $BK\Ev$K%G%#%9%/%9%Z!<%9$,I/Gw$7$F$$$k$"$J$?$K$O!"(B cd / ls -lR | sort +4n $B$,$"$j$^$9!#;~4V$O%A%g%C%H$+$+$j$^$9$,!"$+$J$j;H$($^$9$h!#(B 2.9. $B%Q%s%A7j$r3+$1$kJ,$N%^!<%8%s$r \:Y$J(B Tips 3.1. Linux $B$H(B Windows $B$N6&M-%9%o%C%W%Q!<%F%#%7%g%s!#(B $B!A(BTony Acero$B!"([email protected] 1. $B%Q!<%F%#%7%g%s$r(B dos $B%Q!<%F%#%7%g%s$H$7$F%U%)!<%^%C%H$7$F!"(BWindows $B$N%9%o%C%W%U%!%$%k$r@8@.$9$k!#$^$@(B Windows $B$rAv$i$;$A$c%@%a$G$9!#!J%9(B $B%o%C%W%U%!%$%k$O40A4$K6u$K$7$F$*$/$Y$-!#>.$5$/05=L$G$-$k$N$G!K!#(B 2. Linux $B$r%V!<%H$7!"%9%o%C%W%Q!<%F%#%7%g%s$r%U%!%$%k$H$7$F%;!<%V!#(B $BNc$($P!"%Q!<%F%#%7%g%s$,(B /dev/hda8 $B$@$C$?$i!"(B dd if=/dev/hda8 of=/etc/dosswap $B$H$9$k!#(B 3. dos $B$N%9%o%C%W%U%!%$%k$r05=L!#(B; $BBg$-$5$O;ve#0$J$N$G!"05=LN(9b$7!#(B gzip -9 /etc/dosswap 4. /etc/rc $B%U%!%$%k$K0J2<$N$b$N$r2C$(!"(BLinux $B$N%9%o%C%W6u4V$r=`Hw$9$k(B $B$h$&$K$9$k!#!'(BXXXXX $B$O%9%o%C%W%Q!<%F%#%7%g%s$N%V%m%C%/?t!#(B mkswap /dev/hda8 XXXXX swapon -av $B%U%!%$%k(B /etc/fstab $B$K%9%o%C%W%Q!<%F%#%7%g%s$N%(%s%H%j!<$,2C$o$C$F$$$k(B $B$3$H$r3NG'!#(B 5. $B;H$C$F$$$k%7%9%F%`$N(B init/reboot $B%Q%C%1!<%8$,(B /etc/brc $B$d(B /sbin/brc $B$r(B $B%5%]!<%H$7$F$$$k$J$i!"(B/etc/brc $B$K0J2<$N$b$N$r2C$($k!#%Q%C%1!<%8$,(B /etc/brc $B$r%5%]!<%H$7$F$$$J$$>l9g$O .$5$/$G$-$k!#(B $BH?BP(B: $B%9%F%C%W(B 5 $B$,<+F02=$G$-$J$$$J$i!" !"DL>oI,MW$=$&$J>l=j!K$r(B 'chattr +i command' $B$7$F2s$k$Y$7!#%1%A%1%A$;$:$K$I$s$I$s9T$3$&$h!#%k!<%H$K$"$k%+!<%M%k%U%!%$(B $B%k$b(B immutable $B$K$7$h$&!#.8B$K(B $B$G$-$^$9!#%j%@%$%l%/%7%g%s$r8m$C$F%U%!%$%k$r>e=q$-$7$?$j!"(B'rm -fr' $B%3%^%s(B $B%I$K8m$C$F%9%Z!<%9$rF~$l$A$c$C$F%7%9%F%`$r;HMQITG=$K$7$?$/$J$$$G$7$g!)(B $B!J0MA3$H$7$F%G!<%?$K$O%@%a!<%8$rM?$($i$l$^$9$,!"%i%$%V%i%j$H%P%$%J%j$O(B $B0BA4$K$J$j$^$9!#!K(B $B$^$?!"$3$N:n6H$K$h$j%;%-%e%j%F%#!<$,6/2=$5$l!"3F e=q$-$9$kJ}K!$r$H$C$F$$$k$+$i$G$9!K(B $B$3$N:n6H$K$h$C$FM#0lITJX$K$J$k$N$O!"MM!9$J%7%9%F%`%P%$%J%j$r(B 'make install' $B$9$k$H$-$G$9!#$D$^$j!"$3$N:n6H$K$h$C$F(B 'make install' $B$K$h$k(B $B%U%!%$%k$N>e=q$-$b5qH]$5$l$^$9!#(BMakefile $B$rFI$`$N$rK:$l!">e=q$-$5$l$k(B $B$O$:$N%U%!%$%k!J$H%U%!%$%k$rIU$12C$($h$&$H$7$F$$$k%G%#%l%/%H%j!K$K(B chattr -i $B$7$J$+$C$?>l9g(B -- $B$=$N(B make $B$O<:GT$7$^$9!#$^$"!"C1$K(B chattr $B%3%^%s%I$r;H$C$F$+$i(B make $B$r:F e=q$-$5$l$=$&$J$b$N$r(B .old/ $B%G%#%l%/%H%j$K0\$7$?$j!"%j%M!<%`$7$?$j!"(Btar $B$G$^$H$a$F$*$/%A%c%s%9$G(B $B$b$"$j$^$9!#(B 3.3. $B?7$7$$%b%N$rF~$l$k>l=j$K$D$$$F$NDs8@!#!A(BJim Dennis [email protected] $B?7$7$$%b%N$O$_$s$J!"(B/usr/local $B$+(B /usr/local/`hostname` $B$N2<$G;O$a$h$&!#(B $BG[I[%Q%C%1!<%8$,(B /usr/local $B$r;H$o$J$$$J$i!"<+J,$G(B /usr/local/src$B!"(B /usr/local/bin $B$J$I$r:n$C$F;H$*$&!#(B/usr/local $B%D%j!<$K2?$+CV$/$h$&$JG[I[(B $B%Q%C%1!<%8$J$i!"(B'mkdir /usr/local/`hostname` $B$7$?>e$G!"(B'wheel' $B%0%k!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