Linux
From the name of its creator, Linus Torvalds, influenced by the term Unix. The original name of Linux was Freax, combining the words Free and Unix, and referring to phreaking. The administrator of the server on which Linux was first held didn't like the connection to phreaking, so Torvalds changed the name to Linux.
The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software.The Linux kernel is released under the GNU General Public License version 2 (GPLv2) plus proprietary licenses for some controversial BLOBs and is developed by contributors worldwide. Day-to-day development takes place on the Linux kernel mailing list.The Linux kernel was initially conceived and created by Finnish computer science student Linus Torvalds in 1991. Early on, the MINIX community contributed code and ideas to the Linux kernel. At the time, the GNU Project had created many of the components required for a free software operating system, but its own kernel, GNU Hurd, was incomplete and unavailable. The BSD operating system had not yet freed itself from legal encumbrances. This meant that despite the limited functionality of the early versions, Linux rapidly accumulated developers and users who adopted code from those projects for use with the new operating system. The Linux kernel has received contributions from thousands of programmers. Many Linux distributions have been released based upon the Linux kernel.
Windows
Microsoft Windows is a series of software operating systems and graphical user interfaces proced by Microsoft. Microsoft first introced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces (GUIs). Microsoft Windows came to dominate the world's personal computer market, overtaking Mac OS, which had been introced previously. As of Octoboer 2009, Windows had approximately 93% of the market share of the client operating systems for usage on the Internet. The most recent client version of Windows is Windows 7; the most recent server version is Windows Server 2008.
mac
The Macintosh, or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introced on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a graphical user interface rather than a command-line interface.Through the second half of the 1980s, the company built market share only to see it dissipate in the 1990s as the personal computer market shifted towards IBM PC compatible machines running MS-DOS and Microsoft Windows. Apple consolidated multiple consumer-level desktop models into the 1998 iMac all-in-one, which was a sales success and saw the Macintosh brand revitalized. Current Mac systems are mainly targeted at the home, ecation, and creative professional markets. They are: the aforementioned (though upgraded) iMac and the entry-level Mac mini desktop models, the workstation-level Mac Pro tower, the MacBook, MacBook Air and MacBook Pro laptops, and the Xserve server.
⑵ beyond compare 怎麼用
beyond compare文本對比方法:
步驟一 在電腦上新建兩個文本文件1.txt和2.txt
步驟二 打開Beyond Compare,然後雙擊左邊的「文本比較」,打開「文本比較」會話窗口;
步驟三 打開的新頁面分為左右兩個部分,點擊上面的打開文件的圖標,可以瀏覽本地的文件系統,找到要進行比對的文件;
步驟四 把兩個文件都打開以後,可以看到內容不同的地方會用紅色標注出來,同時,兩個部分都有一個箭頭;
步驟五 點擊左邊的箭頭,可以把左邊的內容同步修改到右邊。點擊右邊的箭頭可以把右邊的內容同步到左邊。這樣可以很方便的對文件就行修改。如下圖是把右邊的內容同步到了左邊。
更多教程:http://www.beyondcompare.cc/support.html
⑶ 魔數是什麼
魔數,magic number,這真是讓人迷惑不解,什麼樣的數字是魔數呢?魔數又是什麼意思呢?哈哈,其實魔數的本意就是讓人感到迷惑的數,看到某個數,不知道其代表何意,用東北話說,都蒙圈了。
魔數,其實也稱為神奇數字,我們大多數人是在學習計算機過程中接觸到這個詞的。它被用來為重要的數據定義標簽,用獨特的數字唯-地標識該數據,這種獨特的數字是只有少數人才能掌握其奧秘的「神秘力量」。
故,直接出現的一個數字,只要其意義不明確,感覺很詭異,就稱之為魔數。魔數應用的地方太多了,如elf 文件頭。
ELF Header :
Magic : 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
這個Magic 後面的一長串就是魔數, elf 解析器(通常是程序載入器)用它來校驗文件的類型是否是elf。
主引導記錄最後的兩個位元組的內容是0x55, 0xaa,這表明這個扇區裡面有可載入的程序, BIOS 就用它來校驗該扇區是否可引導。
有人說只要為這些數字賦予實際的意義不就行了嗎。其實,無論怎麼給這組陌生的數字賦予名稱,它都不像熟悉的出生日期那樣直觀易懂(如對於19590318,不解釋大家也會知道0318 是3 月18 日),反而還要額外增加一些內容來解釋,得不償失,所以這就是魔數不得不存在的原因。
我們知道,一個硬碟上可以有很多分區,每個分區的格式又可以不同。就拿Linux 來說,既能識別ext3,又能識別ext4 。可能有同學會說,這兩個分區的文件系統都是Linux 自己專用的,當然認得自己的東西了。
可是自己的東西也得有個辨別的地方,否則憑什麼說「認得」呢。
其實這是魔數的作用,文件系統也有自己的魔數,魔數的神秘力量在此施展了。各分區都有超級塊,一般位於本分區的第2 個扇區,比如若各分區的扇區以0 開始索引,其第1 個扇區便是超級塊的起始扇區。超級塊裡面記錄了此分區的信息,其中就有文件系統的魔數, 一種文件系統對應一個魔數,比對此值便知道文件系統類型了。
⑷ Linux常用命令
常用的命令有好多啊,你剛開始學,不用特意的去記,用到什麼學什麼就好了。 當然非要列舉,下面列舉的100條,是來自網路經驗上的。 希望對你有幫助。
Linux常用命令大全100條:
1,echo 「aa」 》 test.txt 和 echo 「bb」 》》 test.txt
//》將原文件清空,並且內容寫入到文件中,》》將內容放到文件的尾部
2,chmod go+w -R /home/zhangy //給組用戶和其他用戶添加寫的許可權
3,tar -tzvf test.tar.gz //列出歸檔內容
4, -ah //查看文件列表大小
5, -sh //查看所有文件的大小總和
6,echo 『1+2』|bc -l //數學運算
7,uname -a //查看linux內核等的一些信息
8,badblocks -s /dev/sda //壞道掃描時顯示進度
9,time command //查看命令的運行時間
10,ls -lrt //按時間的倒序排序
11,rsync -P //同步時顯示進度
12.history -c //清楚歷史命令
13,cd - //返回上次目錄
14,tree //顯示目錄樹
15,umount -n /mnt/hda2 //強制卸載
16,echo ~/ //顯示用戶的home目錄
17,echo $[5*5] //算術運算
18,echo $((5*5)) //算術運算
19,eval ls;ps aux|grep httpd //這二個命令都能執行
20,free -m //有MB為單位顯示內存
21,uptime
//顯示系統已經運行了多長時間,它依次顯示下列信息:現在時間、系統已經運行了多長時間、目前有多少登陸用戶、系統在過去的1分鍾、5分鍾和15分鍾內的平均負載
22,加法運算
[root@krlcgcms01 mytest]# let a=34+3;
[root@krlcgcms01 mytest]# echo $a;
23,export //查看所有環境變數
24,echo $PATH //查看單個變數
25,cmp file1 file2 //文件內容比對
26,clear //清屏
27,echo 23423 |awk --re-interval 『/[0-9]{3,}/』 //如果不加re-interval的話,不顯示
28,cal //得到一個整齊的日歷格式
29,wc -l //統計行數,wc -w 統計單詞
30,echo 「AaDCbd23」 |tr 「[A-Z]」 「[a-z]」 大寫變小寫,echo 「AaDCbdc23」 |tr -c b-d =
將b-d之外的字元串替換成=
31,echo 「ADSF」 | iconv -f UTF8 -t GBK //把字元由utf8轉成gbk
-f是from和簡寫,-t好像terminal的簡寫
32,cat -n file //內容的前面會顯示行號
33,chattr +i file //只讀,root用戶也沒法對其進行修改
34,lsattr file //查看文件屬性
35,cat /etc/passwd |awk -F: 『{print $1}』 //查看系統中所有用戶
36,cat /etc/group //查看系統中所有的組
37,groups //查前當前用戶所在的,所有組
38,usermod -g 組名 用戶 //這種方式是覆蓋的方式,用的時候要小心,如果用戶A性於mysql usermod -g php
mysql這樣的話只屬於php了
39,usermod -G 組名 用戶 //這種方式是增加的方式,如果用戶A性於mysql usermod -g php
mysql這樣的話,mysql就屬於2個組了
40,bc //進入數學計算中去
41,umask 003 u許可權是7,g許可權是7,其他用戶是4,也就是774,777-003=774
42,mkfs -t vfat /dev/hda6 //將移動硬碟裡面的一個分區格式化成vfat格式
43,mount /dev/cdrom /media/cdrom //掛載cdrom
44,getent group 532 //通過組ID,來查找組信息
45,last //登錄成功用戶記錄
46,lastb //登錄不成功用戶記錄
47,mp -S /dev/sda2 //查看一下要備份/dev/sda2所要的容量
48,mp -0j -f /dev/hda2/sda2_bak.mp.bz2 /dev/sda2 //將sda2進行備份並壓縮
49,restore -t -f /dev/hda2/sda2_bak.mp //查看備份信息
50,restore -r -f /dev/hda2/sda2_bak.mp //還原備份
51,fc-list //查看系統中安裝的字體
52,find 。/ -type f -exec grep -q 「root」 {} ; -exec echo {} ;
//查找目錄下文件所包涵的字元串
53,vmstat 5 //每5顯示一下次系統信息,cpu,memory,i/o等
54,top 後 在shift + P 所佔進程的排序顯示
55,top 後 在shift + M 所佔內存的排序顯示
56,iptraf -g //查看各個介面的流量
57,ostat -d -x /dev/sda2 2 //用iostat查看磁碟/dev/sda2的磁碟i/o情況,每兩秒刷新一次
58, paste -sd 『|||n』 test //文件的每4行轉換成1行,並用|隔開
59,lsof -i :22 //知道22埠現在運行什麼程序
60,lsof -c abc //顯示abc進程現在打開的文件
61,lsof -p 12 //看進程號為12的進程打開了哪些文件
63,route //查看路由信息
64,ifup //開啟網卡
65,ifdown //關閉網卡
66,route del -net 172.168.0.0 netmask 255.255.0.0 dev eth0 //刪除
172.168這個網段
67,route add -net 172.168.10.0 netmask 255.255.255.0 dev eth0 //增加一個路由
68,netstat -tunl //列出監聽的網路服務埠
69,netstat -tun //列出已連接的網路服務埠
70,nmap -sP 172.30.4.0/24 //在這個網段內有多少用戶在我的主機上操作,一個不錯的安全檢查工具
71,vgdisplay //查看系統中的可用空間
72,lvextend -L+20G /dev/tank/part1 //向part1這個分區增加20G的空間
73,lvresize -L-10G /dev/tank/part2 //向part2這個分區減少10G的空間
74,pvdisplay //查看磁碟信息
75,mplayer -loop 10 /mnt/song/music/花兒開了.mp3 //循環播放10遍
76,pacman -S firefox -nd //nd去掉依賴
77,wget -c //斷點下載
78,chroot /mnt/ubuntu //改變根目錄到/mnt/ubuntu
79,ctrl+a //命令行下,游標稱動到開頭
80,ctrl+e //命令行下,游標移動結尾
81,cut -d: -f 1-4 test //用:分割文件,取分割後的1-4列
82,file /home/zhangy/test.php //用於查看文件的一些基本信息
83,touch test.txt //創建一個空文件 text.txt
84,htpasswd -cbd /usr/local/nginx/conf/authfile //創建訪問控制文件
85,df //查看磁碟空間,和當前的磁碟數
86,fdisk -l //查看所有磁碟數
87,alsamixer //進入後,m鍵可以實現靜音
88,killall httpd //把所有httpd進程殺掉
89,killall -9 mysqld_safe //有些進程超級用戶也停止不了,-9是強制刪除
90,mirror /mysql //下載mysql目錄
91,mirror -R /mysql //上傳mysql目錄
92,rmmod pcspkr //關掉tab提示音
93,modprobe pcspkr //開啟tab提示音
94,gpasswd -a zhangy wheel //將zhangy這個用戶添加到wheel這個組
95,dd if=/dev/zero of=/virtual/ubuntu.virt.img bs=1M count=4096
//創建一個4G的IMG鏡像
96,lspic //顯示pci設備
97,lsusb //顯示usb設備
98,history | less //less根more有點像,感覺less用著更舒服點
99,ln -s //如果忘了-s就變成硬鏈接了
100,tar zxvf test.tar.gz -C /home/zhangy //將內容解壓到指定目錄