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

linux쵀fastcopy

ÔÚ¿½±´Êý¾ÝµÄʱºò£¬Èç¹ûÓöµ½Ò»¶ÑСÎļþ£¬¼´Ê¹×ÜÊý¾ÝÁ¿ºÜС£¬¿½±´Ò²»áºÜ·Ñʱ£¬ÔÚwinÏ£¬ÓÐÒ»¸öÈí¼þ½Ðfastcopy£¬¿ÉÒÔʵÏÖ¿ìËÙ¿½±´£¬¾Ý˵ʹÓÃÁËÒ»ÖÖ½ÐÄÚ´æÓ³ÉäµÄ¼¼Êõ£¬ÄÇôÔÚLinuxÏÂÓÐûÓÐÄØ£¿
ÎÒÕÒÁ˰ëÌ죬ԭÀ´LInuxϸù±¾²»ÐèÒªµ¥¶ÀµÄÈí¼þ£¬ÓÃÏÖÓеÄÃüÁî×éºÏ¾ÍOKÁË£¡
ÓиßÊÖÔÚÁ½¸ö·þÎñÆ÷¼ä´«Êý¾Ý£¬Ê¹ÓÃÃüÁʵÏÖÁË¿ìËÙ´«ËÍÊý¾Ý¡£
http://www.4bcj.com/post/2008/01/Fast-File-Copy—Linux!.aspx
All good ideas come out of necessity. We were cloning an instance of
Oracle Financials from one server to another. There are a LOT of files
under < 1k and the copy takes forever. Yesterday the copy was kicked
off using SCP - there was 39GBs to copy over a gigabit switch. This
should have been less than 10 minutes but actually took over 8 hours
because of all the small files. The copy failed and we needed to fix
the problem and copy it a lot faster (30 minutes) today.
After clearing up 10 GBs of log files, we were left with hundreds of
thousands of small files that were going to slow us down. We couldn’t
tarball the file because of a lack of space on the source server. I
started searching around and found this nifty tip that takes our
encryption and streams all the files as one large file:
This requires netcat on both servers.
Destination box: nc -l -p 2342 | tar -C /target/dir -xzf -
Source box: tar -cz /source/dir | nc Target_Box 2342
It’s been about 4 minutes and I’m already 1/3 of the way done!
¸Ðл±¾Ð£LInux°æÖ÷ashmer£¬Ð´ÁËÕâ¸öshell½Å±¾£¬¿ÉÒÔʵÏÖfastcopy, ÓëÖîλ¹²Ïí.
#!/bin/sh
# file: fastcp.sh
source="$1"
target="$2"
if [ "x$1" == "x" ] || [ "x$2" == "x" ] ; then
echo "$0 SOURCE_DIR TARGET_DIR"
exit 1
fi
exec tar -cp "$source" -f - | tar -xpv -C "$target" -f -
#end
PS: ²âÊÔÁËÒ»·¬£¬ËٶȾ¹È»ÓÉcpµÄ0m21.270s½µµÍÖÁ0m6.984s£¬ÕæÊǹ»¿ìµÄ¡£¡£¡£


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

Linux ±àÒë°²×° MYSQL 5.1 Óë Innodb

Linux ±àÒë°²×° MYSQL 5.1 Óë Innodb
±àÒëmysql5
´úÂë:
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \
--with-extra-charsets=all \
--with-charset=utf8 \
- ......

ǶÈëʽlinuxϵͳÓëÓ¦ÓÃ

Emebedded System and Application(Linux)
 
Goal
--
ÕÆÎÕǶÈëʽϵͳ¿ª·¢µÄÁ÷³Ì£¬ÏµÍ³ÒÆÖ²µÄ·½·¨£¬±àдBootloader
            (Be familiar with the process of ES Developing
, System Migration
amd Bootloader Programming
)
 Requriem ......

Linux±³ºóµÄÈË

1. LinusºÍBill
ËÆºõÔÚÒ»Ò¹Ö®¼ä£¬Õâ¸öÃû×ÖͻȻ±äµÃͬÏó±È¶û¡£¸Ç´ÄÒ»ÑùµÄ¶úÊìÄÜÏê¡£µ«ÊDZȶû¡£¸Ç´Ä£¬
ÄÄÅÂÉí¼ÛÓÐÊý²»Çå±¶µÄ°ÙÍòÃÀ½ð£¬Ò²ÓÀÔ¶²»»á±ä³ÉLinux Torvalds¡£Õâλ29ËêµÄ·ÒÀ¼ÈË£¬
¼òµ¥¶øÇ¿´óµÄLinux²Ù×÷ϵͳµÄ´´ÔìÕߣ¬³¬Ô½Á˸ǴĵÄÉñ»°¡£Ò²Óд«ÎÅ˵¸Ç´ÄÊÇÒ»¸ö
׿ԽµÄ³ÌÐòÔ±£¬µ«LinusÊÇ»õÕæ¼ÛʵµÄ¸ßÊÖ¡£»¹ÔÚ´óѧÀï ......

Linux LVM µÄʹÓÃÏê½â

welcome Linux LVM µÄʹÓÃÏê½â ÕªÒª£ºLinuxÓû§°²×°Linux²Ù×÷ϵͳʱÓöµ½µÄÒ»¸ö×î³£¼ûµÄÄÑÒÔ¾ö¶¨µÄÎÊÌâ¾ÍÊÇÈçºÎÕýÈ·µØ¸øÆÀ¹À¸÷·ÖÇø´óС£¬ÒÔ·ÖÅäºÏÊʵÄÓ²Å̿ռ䡣¶øÓöµ½³öÏÖij¸ö·ÖÇø¿Õ¼äºÄ¾¡Ê±£¬½â¾öµÄ·½·¨Í¨³£ÊÇʹÓ÷ûºÅÁ´½Ó£¬»òÕßʹÓõ÷Õû·ÖÇø´óСµÄ¹¤¾ß(±ÈÈçPatition MagicµÈ)£¬µ«Õâ¶¼Ö»ÊÇÔÝʱ½â¾ö°ì·¨£¬Ã»Óиù±¾½â¾öÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ