Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

Linux Shell±à³Ìstep by step Îı¾Îļþ×îºóÁ½ÐÐÏà¼õ

×÷Õß:fbysss
msn:jameslastchina@hotmail.com 
blog:blog.csdn.net/fbysss
ÉùÃ÷£º±¾ÎÄÓÉfbysssÕûÀí±àд£¬×ªÔØÇë×¢Ã÷³ö´¦
¹Ø¼ü×Ö£ºshell±à³Ì
±³¾°
        ͬÊÂÇóÖú¡£
ÐèÇó
      Ò»¸öÎı¾Îļþ£¬ÒªµÃµ½×îºóÒ»ÐÐÓëµ¹ÊýµÚÒ»ÐÐÏà¼õµÄ½á¹û¡£
²âÊÔÎÄ ......

ʹÓÃLinuxµÄrsyncÃüÁîʵÏÖ£º¶à·þÎñÆ÷¾µÏñͬ²½

¡¡¡¡ÊµÏÖ¹¦ÄÜ£ºµ±Óû§ÔÚ±¾µØ¿Í»§¶ËijĿ¼ÄÚ½¨Á¢¡¢Ð޸ġ¢É¾³ýĿ¼»òÎļþ¡¢ÐÞ¸ÄĿ¼»òÎļþµÄÊôÐÔ£¬Ö»ÒªÖ´ÐÐÏàͬµÄshell½Å±¾£¬rsync¾Í»á×Ô¶¯ÕÒ³öÓиĶ¯»òɾ³ýµÄÊý¾Ý£¬½«Æä´«Ë͵½·þÎñÆ÷ÉÏ£¬Ê¹·þÎñÆ÷¶ËijĿ¼ÄÚµÄÊý¾Ý¸ú±¾µØ¿Í»§¶ËijĿ¼ÄÚµÄÊý¾Ý±£³ÖÒ»Ö¡£
¡¡¡¡¡ï·½Ê½Ò»£º
¡¡¡¡Ò»¡¢·þÎñÆ÷¶Ë£¨Àý£º10.0.0.1*£©£º
¡¡¡¡1¡¢´´½¨Óà ......

LinuxÖÐRCU»úÖƵÄÔ­Àí

Ô­ÎÄÍøÖ·£ºhttp://group.ednchina.com/1036/21283.aspx
 RCU»úÖÆÊÇLinux2.6Ö®ºóÌṩµÄÒ»ÖÖÊý¾ÝÒ»ÖÂÐÔ·ÃÎʵĻúÖÆ£¬´ÓRCU£¨read-copy-update£©µÄÃû³ÆÉÏ¿´£¬ÎÒÃǾÍÄܶÔËûµÄʵÏÖ»úÖÆÓÐÒ»¸ö´ó¸ÅµÄÁ˽⣬ÔÚÐÞ¸ÄÊý¾ÝµÄʱºò£¬Ê×ÏÈÐèÒª¶ÁÈ¡Êý¾Ý£¬È»ºóÉú³ÉÒ»¸ö¸±±¾£¬¶Ô¸±±¾½øÐÐÐ޸ģ¬ÐÞ¸ÄÍê³ÉÖ®ºóÔÙ½«ÀÏÊý¾Ýupdate³ÉеÄÊý¾Ý£¬´ ......

Linux C notes (BOOK UNIX)

Chapter 1: Thread
¢Ù thread functions
1. pthread_self();
2. thread existing
    you can get the value of rval_ptr just by  pthread_join(pthread_t tht, void ** rval_ptr)
    cancel a thread as the thread exits with PTHREAD_CANCELED in pthread_exit, this functio ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ