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

WindowsºÍLinux¼äÎı¾Îļþ¸ñʽת»»

ÎÊÌ⣺ÔÚLinuxÏÂÕý³£»»ÐеÄÎÄ×Ö£¬µ½ÁËWindowsϺ󣬲»ÔÙ»»ÐС£
 
ÔÚWindowsÏ»»ÐÐʱ£¬ÓÐÁ½¸ö×Ö·û£º»Ø³µ(\r)ºÍ»»ÐÐ(\n)¡£µ«ÔÚLinuxÏ£¬Ö»ÓÐÒ»¸ö»»ÐÐ(\n)
¿ÉʹÓÃunix2dosºÍdos2unixÃüÁî½øÐиñʽµÄת»»£º
²ÎÊý£º
-k  ±£³ÖÊä³öÎļþºÍÊäÈëÎļþµÄÈÕÆÚʱ¼ä´Á²»±ä
-o file   ĬÈÏģʽ . ½«fileת»»£¬²¢Êä³öµ½file
-n  infile outfile ÐÂģʽ. ת»»infile, ²¢Êä³öµ½outfile
 
 
1.       unix2dos
 
¼ÙÉèÓÃviн¨Ò»Îı¾Îļþ£¬ÊäÈë123456
[root@centos test]# ls -l a.txt
-rw-r--r-- 1 root root 7 Jan  7 21:31 a.txt
[root@centos test]# hexdump -c a.txt
0000000   1   2   3   4   5   6  \n
0000007
[root@centos test]# unix2dos -n a.txt b.txt
unix2dos: converting file a.txt to file b.txt in DOS format ...
[root@centos test]# ls -l
total 8
-rw-r--r-- 1 root root 7 Jan  7 21:31 a.txt
-rw------- 1 root root 8 Jan  7 21:34 b.txt
[root@centos test]# hexdump -c a.txt
0000000   1   2   3   4   5   6  \n
0000007
[root@centos test]# hexdump -c b.txt
0000000   1   2   3   4   5   6  \r  \n
0000008
b.txtÊÇת»»ºóµÄDOSϵÄÎļþ
 
2.       dos2unix
[root@centos test]# dos2unix -n b.txt c.txt
dos2unix: converting file b.txt to file c.txt in UNIX format ...
[root@centos test]# ls -l
total 12
-rw-r--r-- 1 root root 7 Jan  7 21:31 a.txt
-rw------- 1 root root 8 Jan  7 21:34 b.txt
-rw------- 1 root root 7 Jan  7 21:38 c.txt
[root@centos test]# hexdump -c b.txt
0000000   1   2   3   4   5   6  \r  \n
0000008
[root@centos test]# hexdump -c c.txt
0000000   1   2   3   4   5   6  \n
0000007
c.txtÊÇת»»ºóunixϵÄÎı¾Îļþ
 


Ïà¹ØÎĵµ£º

LinuxµÄÎå¸ö²éÕÒÃüÁî


×î½ü£¬ÎÒÔÚѧϰLinux£¬ÏÂÃæÊÇһЩ±Ê¼Ç¡£
ʹÓõçÄÔµÄʱºò£¬¾­³£ÐèÒª²éÕÒÎļþ¡£
ÔÚLinuxÖУ¬Óкܶ෽·¨¿ÉÒÔ×öµ½ÕâÒ»µã¡£¹úÍâÍøÕ¾LinuxHaxor×ܽáÁËÎåÌõÃüÁÄã¿ÉÒÔ¿´¿´×Ô¼ºÖªµÀ¼¸Ìõ¡£´ó¶àÊý³ÌÐòÔ±£¬¿ÉÄܾ­³£Ê¹ÓÃÆäÖеÄ2µ½3Ìõ£¬¶ÔÕâ5ÌõÃüÁî¶¼ºÜÊìϤµÄÈËÓ¦¸ÃÊDz»¶àµÄ¡£
1. find
findÊÇ×î³£¼ûºÍ×îÇ¿´óµÄ²éÕÒÃüÁÄã¿ÉÒÔÓà ......

£¨³¤ÆÚ»ýÀÛ£©Ò»Ð©linuxÄÚºËѧϰ·½·¨»ýÀÛ

¡¶LinuxÄÚºËÔ´´úÂëÍêȫעÊÍ¡·ÊÇͦ²»´íµÄ£¬µ«ÒªÀí½âÕûÌå¼Ü¹¹µÄ»°»¹ÊÇÏȱð¿´Õâ¸ö£¬»¹ÊǵȾßÌå·ÖÎöÄÚºËÄĸö²¿·ÖµÄʱºòÔÙÕë¶Ô×ÅÈ¥¿´ÏàÓ¦²¿·ÖµÄ×¢ÊͰɣ®
a.ÍÆ¼öÄÚºËѧϰÊé¼®
  1.ѧϰÄÚºËÕûÌå½á¹¹ºÍ»ù±¾ÀíÂÛ֪ʶ: <Linux Kernel Development second edition>,ÖÐÎÄÃû:LinuxÄÚºËÉè¼ÆÓëʵÏÖ µÚ2°æ
  2.Ñ§Ï°Ç ......

uc/OSÓëLinuxµÄ±È½Ï

    
Ëæ×ÅÏÖ´ú¼ÆËã»ú¼¼ÊõµÄ·ÉËÙ·¢Õ¹ºÍ»¥ÁªÍø¼¼ÊõµÄ¹ã·ºÓ¦Ó㬴Ópcʱ´ú¹ý¶Éµ½ÁËÒÔ¸öÈËÊý×ÖÖúÀí¡¢ÊÖ³Ö¸öÈ˵çÄÔºÍÐÅÏ¢¼ÒµçΪ´ú±íµÄ3c(¼ÆËã»ú¡¢Í¨ÐÅ¡¢Ïû·Ñµç
×Ó)Ò»ÌåµÄºópcʱ´ú¡£ºópcʱ´úÀǶÈëʽϵͳ°çÑÝÁËÔ½À´Ô½ÖØÒªµÄ½ÇÉ«£¬±»¹ã·ºÓ¦ÓÃÓÚÐÅÏ¢µçÆ÷¡¢Òƶ¯¼ÆËã»úÉ豸¡¢ÍøÂçÉ豸ºÍ¹¤¿Ø·ÂÕæµÈÁìÓò¡£Ç¶Èëʽ ......

²é¿´linuxÊÇ32λ»¹ÊÇ64λ

1.#uname -a
Èç¹ûÓÐx86_64¾ÍÊÇ64λµÄ£¬Ã»ÓоÍÊÇ32λµÄ
2.# uname -m
x86_64
3.# arch
x86_64
4.#file /bin/cat
/bin/cat: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped
5.²é¿´cpuÊǶàÉÙλµÄ
more /proc/cpuinfo
ÔõÑù²é¿´ LI ......

¹ØÓÚLinuxÄÚºËѧϰ

³£³£ÓÐÈËÎÊ£ºÎÒÏëѧϰÄںˣ¬ÐèҪʲô»ù´¡Âð£¿Linus Torvalds±¾ÈËÊÇÕâÑù»Ø´ðµÄ£ºÄã±ØÐëʹÓùýLinux¡£ Õâ¸ö¡­¡­»¹ÊÇÓеãÌ«·ºÁ˰ɣ¬ÎÒÏëÏÂÃæ¼¸¸ö»ù´¡¿ÉÄÜ»¹ÊÇÐèÒªµÄ£¬¾¡¹Ü²»Ò»¶¨±ØÐ裺
1, ¹ØÓÚ²Ù×÷ϵͳÀíÂÛµÄ×î³õ¼¶µÄ֪ʶ¡£²»ÐèҪͨ¶Á²¢Àí½â¡¶²Ù×÷ϵͳ¸ÅÄî¡·¡¶ÏÖ´ú²Ù×÷ϵͳ¡·µÈ¾ÞÖø£¬µ«×ÜÒªÖªµÀ·Öʱ£¨time-shared£©ºÍÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ