Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux ½Å±¾±àд»ù´¡(Áù)

ÎļþÑ­»·³ÌÐò
»òÐíÄúÊÇÏ뽫ËùÓз¢³öµÄÓʼþ±£´æµ½Ò»¸öÎļþÖеÄÈËÃÇÖеÄÒ»Ô±£¬µ«ÊÇÔÚ¹ýÁ˼¸¸öÔÂÒÔºó£¬Õâ¸öÎļþ¿ÉÄÜ»á±äµÃºÜ´óÒÔÖÁÓÚʹ¶Ô¸ÃÎļþµÄ·ÃÎÊËٶȱäÂý¡£ÏÂÃæµÄ½Å±¾rotatefile¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£Õâ¸ö½Å±¾¿ÉÒÔÖØÃüÃûÓʼþ±£´æÎļþ£¨¼ÙÉèΪoutmail£©Îªoutmail.1£¬¶ø¶ÔÓÚoutmail.1¾Í±ä³ÉÁËoutmail.2 µÈµÈµÈµÈ...
#!/bin/sh
# vim: set sw=4 ts=4 et:
ver="0.1"
help()
{
cat <
rotatefile -- rotate the file name
USAGE: rotatefile [-h] filename
OPTIONS: -h help text
EXAMPLE: rotatefile out
This will e.g rename out.2 to out.3, out.1 to out.2, out to out.1
and create an empty out-file
The max number is 10
version $ver
HELP
exit 0
}
error()
{
echo "$1"
exit 1
}
while [ -n "$1" ]; do
case $1 in
-h) help;shift 1;;
--) break;;
-*) echo "error: no such option $1. -h for help";exit 1;;
*) break;;
esac
done
# input check:
if [ -z "$1" ] ; then
error "ERROR: you must specify a file, use -h for help"
fi
filen="$1"
# rename any .1 , .2 etc file:
for n in 9 8 7 6 5 4 3 2 1; do
if [ -f "$filen.$n" ]; then
p=`expr $n + 1`
echo "mv $filen.$n $filen.$p"
mv $filen.$n $filen.$p
fi
done
# rename the original file:
if [ -f "$filen" ]; then
echo "mv $filen $filen.1"
mv $filen $filen.1
fi
echo touch $filen
touch $filen
Õâ¸ö½Å±¾ÊÇÈçºÎ¹¤×÷µÄÄØ£¿ÔÚ¼ì²âÓû§ÌṩÁËÒ»¸öÎļþÃûÒÔºó£¬ÎÒÃǽøÐÐÒ»¸ö9µ½1µÄÑ­»·¡£Îļþ9±»ÃüÃûΪ10£¬Îļþ8ÖØÃüÃûΪ9µÈµÈ¡£Ñ­»·Íê³ÉÖ®ºó£¬ÎÒÃǽ«Ô­Ê¼ÎļþÃüÃûΪÎļþ1ͬʱ½¨Á¢Ò»¸öÓëԭʼÎļþͬÃûµÄ¿ÕÎļþ¡£
µ÷ÊÔ //---------------------------------------
//---------------------------------------
×î¼òµ¥µÄµ÷ÊÔÃüÁȻÊÇʹÓÃechoÃüÁî¡£Äú¿ÉÒÔʹÓÃechoÔÚÈκλ³Òɳö´íµÄµØ·½´òÓ¡ÈκαäÁ¿Öµ¡£ÕâÒ²ÊǾø´ó¶àÊýµÄshell³ÌÐòÔ±Òª»¨·Ñ80%µÄʱ¼äÀ´µ÷ÊÔ³ÌÐòµÄÔ­Òò¡£Shell³ÌÐòµÄºÃ´¦ÔÚÓÚ²»ÐèÒªÖØбàÒ룬²åÈëÒ»¸öechoÃüÁîÒ²²»ÐèÒª¶àÉÙʱ¼ä¡£
shellÒ²ÓÐÒ»¸öÕæʵµÄµ÷ÊÔģʽ¡£Èç¹ûÔڽű¾"strangescript" ÖÐÓдíÎó£¬Äú¿ÉÒÔÕâÑùÀ´½øÐе÷ÊÔ£º
sh -x strangescript
Õ⽫ִÐиýű¾²¢ÏÔʾËùÓбäÁ¿µÄÖµ¡£
shell»¹ÓÐÒ»¸ö²»ÐèÒªÖ´Ðнű¾Ö»ÊǼì²éÓï·¨µÄģʽ¡£¿ÉÒÔÕâÑùʹÓãº


Ïà¹ØÎĵµ£º

LINUXÄں˱àÒ루ת£©

×î½üÔÚÍøÉÏ¿´Á˼¸¸öLinuxÄں˱àÒë·½ÃæµÄÎÄÕ£¬ÓÉÓںܶàÕâÑùµÄÌû×Ó£¬Ëæ±ã¿´Á˼¸¸ö¶¼²î²»¶à°É¡£ÔÚÎÒÕæÕý×Ô¼º¶¯ÊÖȥʵ¼ùµÄʱºò£¬³öÏÖÁ˺ܶàµÄÎÊÌâ¡£¸Ð¾õÊDz»ÄÜÍêÈ«°´ÕÕ±ðÈ˵ķ½·¨À´£¬ÒòΪÄãÃǵĵ±Ê±µÄ»úÆ÷¹¤×÷»·¾³¿ÉÄÜÊDz»Ò»ÑùµÄ¡£Õû¸ö¹ý³ÌÇúÕÛ¿²¿À¡£µ«ÊÇ×îºó»¹Êdzɹ¦À²£¡ÏÂÃæÎÒ½«¸ø³ö×Ô¼ºµÄʵ¼ù¹ý³ÌºÍ×¢Òâµã¡£
Ò»,ΪʲôҪ± ......

LinuxÏÂPatchµÄÓ¦ÓúÍÖÆ×÷·½·¨½éÉÜ


LinuxÏÂPatchµÄÓ¦ÓúÍÖÆ×÷·½·¨½éÉÜ £¨1£©
 
·¢²¼Ê±¼ä£º2007.04.19 06:10     À´Ô´£ºÈüµÏÍø¼¼ÊõÉçÇø    ×÷Õߣºskid
 
ÒòΪÔÚu-bootÒÆÖ²¹ý³ÌÖУ¬Óм¸´¦Í¨ÓÃÎļþÒªÐ޸ģ¬Èç¹ûÿ´Î¶¼ÒªÊÖ¶¯Ð޸ľÍÌ«Âé·³ÁË¡£ÖÆ×÷²¹¶¡¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£
ѧϰ×ÊÁϵÄÊÕ¼¯±È½Ï¼òµ¥£¬ ......

Redhat AS4 Linux³£Ó÷þÎñºÍ¹¤¾ß


ÕâÀï¼Ç¼Redhat LinuxÖеÄһЩ³£Ó÷þÎñºÍÅäÖù¤¾ß¡£°æ±¾»ùÓÚAS4¡£
1.Firewall
ͨ¹ýÃüÁîÐÐÅäÖãºlokkit
ͼÐνçÃæÅäÖãºApplications->System Settings->Security Level
2.samba
/etc/init.d/smb start | /etc/init.d/smb stop | /etc/init.d/smb restart
»òÕß
service smb start | service smb stop | servic ......

ÔÚLinuxÏÂÈçºÎ¿ìËٴ°²È«µÄFTP·þÎñÆ÷

ÔÚLinuxÏÂÈçºÎ¿ìËٴ°²È«µÄFTP·þÎñÆ÷ ÏÖÔÚÁ÷ÐеÄFTP·þÎñÆ÷£¬±È½ÏÖøÃûµÄÓÐWU-FTP£¨Washington University FTP£©ºÍVSFTP£¨Very Secure FTP ·Ç³£°²È«µÄFTP£©ÒÔ¼°Proftp,pureftpµÈ¶øVSFTPÒÔÆä¸ß¶È°²È«ÐԺ͸ßËÙÎȶ¨µÄÌØÐÔÕýÔÚ³ÉΪ»¥ÁªÍøÉÏFTP·þÎñÆ÷µÄг衣ÏÖÔÚ±ÊÕß°ÑÔÚFedoraÉÏÅäÖÃÒ»¸ö°²È«FTPµÄ¹ý³ÌºÍ´ó¼Ò½»Á÷£¬Ï£Íû½è´ËÄܹ² ......

LinuxÏ mplayer ʹÓÃÊÖ²á


²¥·ÅÎļþ
ʹÓà MPlayer ²¥·ÅýÌåÎļþ×î¼òµ¥µÄ·½Ê½ÊÇ£º
mplayer <somefile>
MPlayer »á×Ô¶¯¼ì²âÎļþµÄÀàÐͲ¢¼ÓÒÔ²¥·Å£¬Èç¹ûÊÇÒôƵÎļþ£¬Ôò»áÔÚÃüÁîÐÐÖÐÏÔʾ¸Ã²¥·ÅÎļþµÄ״̬ÐÅÏ¢£»¶ø¼ÙÈçÊÇÊÓƵÎļþµÄ»°£¬Ôò»á´ò¿ªÒ»¸öеIJ¥·Å´°¿Ú¡£
µ¹ÍËÓë¿ì½ø
ÔÚ²¥·ÅÎļþµÄʱºò£¬Äã¿ÉÒÔͨ¹ýÒÔÏÂÈý×é¿ì½Ý¼üÀ´¶Ô²¥·Å½ø³Ì½øÐе¹Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ