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

SubVersion¶¨ÆÚÍêÕû±¸·Ý½Å±¾(Linux)

½Å±¾¹¦ÄÜ: ¶¨ÆÚ¶ÔһЩÏîÄ¿½øÐÐÍêÕû±¸·Ý.
project.lst Îļþ¸ñʽÈçÏÂ:
project1
project2
±¸·Ý½Å±¾ÈçÏÂ:
#!/bin/sh
#
# subversion data backup script
# by scud http://www.jscud.com
# 2005-11-27
#
# subversionÍêÕû±¸·ÝµÄ½Å±¾,µ÷ÕûºÃºóʹÓÃcrontab -e ·Åµ½×Ô¶¯Ö´ÐÐÀïÃæ¼´¿É.
#
#±¸·ÝÈÕÖ¾Îļþ
LogFile=/backup/svn/svnbak.log
DATE=`date +%Y%m%d`
#±¸·ÝĿ¼
BakDir=/backup/svn/data
#ÈÕ³£±¸·ÝĿ¼,Èç¹ûÓÐ
DailyDir=/backup/svn/daily
#Òª±¸·ÝµÄÏîÄ¿ÁбíÎļþ,Ö»ÓÐÏîÄ¿Ãû
ProjectLst=/backup/svn/project.lst
#ËùÓÐÏîÄ¿¶¼±£´æÔÚÕâ¸öĿ¼ÏÂ
SvnDir=/var/svn
#svnadmin³ÌÐòµÄ·¾¶
SVNADMIN=/app/subversion/bin/svnadmin
echo " " >> $LogFile
echo " " >> $LogFile
echo "-------------------------------------------" >> $LogFile
echo $(date +"%y-%m-%d %H:%M:%S") >> $LogFile
echo "--------------------------" >> $LogFile
cd $BakDir
#¶ÁÈ¡ÏîÄ¿Áбí
PROJECTLIST=`cat $ProjectLst`
for project in $PROJECTLIST
do
projectdata=$SvnDir/$project
destdir=$BakDir/$project
dumpfile=$DATE.$project.tgz
if [ -f $BakDir/$dumpfile ]
then
echo "backup file have exist!" >>$LogFile
else
$SVNADMIN hotcopy $projectdata $destdir --clean-logs
tar czvf $dumpfile $destdir >/dev/null
rm -fr $project
echo "backup $project done into $dumpfile ">>$LogFile
fi
## delete old tgz ´Ë´¦¸ù¾ÝcrontabµÄʱ¼äµ÷Õû,ÀýÈçÒ»ÖÜÒ»´Î±¸·Ý,´Ë´¦±£ÁôÁË5·Ý±¸·Ý,ÒÔÇ°µÄɾ³ý
oldfile="$BakDir/"$(date +%y%m%d --date=’28 days ago’).$project.tgz
if [ -f $oldfile ]
then
rm -f $oldfile >> $LogFile 2>&1
echo "[$oldfile]Delete Old File Success!" >> $LogFile
else
echo "[$oldfile]No Old Backup File!" >> $LogFile
fi
done
#delete previous daily backup files
cd $DailyDir
rm -f *
¸ù¾Ý×Ô¼ºµÄÉèÖÃÅäÖúúó,ʹÓÃcrontab ·Åµ½¶¨Ê±Ö´ÐеÄÈÎÎñÀï¼´¿É.


Ïà¹ØÎĵµ£º

¡¶LINUXÉ豸Çý¶¯³ÌÐò¡·Ñ§Ï°Ôý¼Ç£¨Ò»£©

×ܽáÕ½ڣºµÚÒ»Õ É豸Çý¶¯³ÌÐò¼ò½é
          µÚ¶þÕ ¹¹ÔìºÍÔËÐÐÄ£¿é
Ìáµ½Çý¶¯³ÌÐò¾Í²»µÃ²»ÏÈ˵ÏÂÁ½¸öÃû´Ê£ºÄں˿ռäºÍÓû§¿Õ¼ä¡£Óû§¿Õ¼ä¼´Óû§Ó¦ÓÃËùÔËÐеĿռ䣬Äں˿ռäÖµµÃÊDzÙ×÷ϵͳÄÚºËÔËÐеĿռ䡣Óû§¿Õ¼ä²»ÄÜÖ±½ÓÒýÓûòÕß²Ù×÷Äں˿ռäµÄÊý¾Ý£¬Äں˿ռäÒ²²»ÄÜÖ±½ ......

Linux ÄÚºËÅäÖÃ

LinuxÄÚºËÅäÖð취£º
1. make config
ÕâÖÖ°ì·¨»á±éÀúËùÓÐÅäÖÃÏҪÇóÓû§Öð¸öÑ¡ÔñY/N/M
2. make menuconfig
Õâ¸ö°ì·¨ÊÇ»ùÓÚncurse¿â±àÖƵÄͼÐνçÃ湤¾ß¡£³£ÓÃ
3. make xconfig
ÓÃÓÚ»ùÓÚX11µÄͼÐι¤¾ß
4. make gconfig
ÓÃÓÚ»ùÓÚgtk+ͼÐι¤¾ß
5. make defconfig
´´½¨Ò»¸öĬÈϵÄÅäÖã¬Éú³Éµ±Ç°µÄ.config
6. make x ......

linux 0.11 ÄÚºËѧϰ read_write.c


/*
 * ¸ÃÎļþʵÏÖϵͳµ÷ÓÃread£¬writeºÍlseek¡£
 */
/*
 *  linux/fs/read_write.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <sys/stat.h>
#include <errno.h>
#include <sys/types.h>
#include <linux/kernel.h>
#include < ......

linux 0.11 ÄÚºËѧϰ char_dev.c


/*
 *  linux/fs/char_dev.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <errno.h>
#include <sys/types.h> // ¶¨ÒåÁË»ù±¾µÄϵͳÊý¾ÝÀàÐÍ
#include <linux/sched.h>
#include <linux/kernel.h> // º¬ÓÐһЩÄں˳£Óú¯ÊýµÄÔ­Ðζ¨Òå
#include < ......

LinuxÖض¨ÏòÏê½â

תÔØ£ºhttp://www.cnblogs.com/hexapodsoft/archive/2007/04/24/724902.html
I/OÖض¨ÏòÏê½â¼°Ó¦ÓÃʵÀý
1¡¢ »ù±¾¸ÅÄÕâÊÇÀí½âºóÃæµÄ֪ʶµÄÇ°ÌᣬÇëÎñ±ØÀí½â£©
a¡¢ I/OÖض¨Ïòͨ³£Óë FDÓйأ¬shellµÄFDͨ³£Îª10¸ö£¬¼´ 0¡«9£»
b¡¢ ³£ÓÃFDÓÐ3¸ö£¬Îª0£¨stdin£¬±ê×¼ÊäÈ룩¡¢1£¨stdout£¬±ê×¼Êä³ö£©¡¢2£¨stderr£¬±ê×¼´íÎóÊä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ