查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Emix

Let Your Creativity Fly...

 
 
 
 
 
 

海外 韩国 天蝎座

 发消息  写留言

 
吾志所向,一往无前。
 
近期心愿just be a programmer
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 

联系我

 
 
模块内容加载中...
 
 
 
 
 
 
 
模块内容加载中...
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
模块内容加载中...
 
 
 
 
 

日志分类

 
 
日志分类列表加载中...
 
 
 
 
 
 
 
 

统计学一些经典书籍

2013-6-26 9:59:34 阅读839 评论1 262013/06 June26

Probability & Measure:
Probability Theory: Theory and Examples, 3rd edition, Richard Durrett 国内有第2版影印本
Probability and Measure, Patrick Billingsley
Convergence of Probability Measures, Patrick Billingsley
A Course in Probability Theory Revised, Kai Lai Chung

Mathematical Statitsics:
Introduction to Mathematical Statistics, Hogg & Craig (高教社出了第5版影印本)
Mathematical Statistics, Jun Shao
Mathematical Statistics, Peter J. Bickle
作为数理统计学的课本不错。茆诗松、王静龙的《高等数理统计》是国内用得很多的课本。

Inference:
Statistical Inference, Casella & Berger 是国外读统计基本必修的的一本书,国内有影印本。All of Statistics: A Concise Course in Statistical Inference, Larry Wasserman 是一本涵盖面很广的速成式的lecture notes样式的书,偏nonparametric。Theory of Statistics, Schervish 偏Bayesian和decision theory。此外还有: Testing Statistical Hypotheses, Lehmann & Romano, Theory of Point Estimation, Lehmann & Casella。更多的advanced topics举不胜举。

Asymptotics & large sample theory:
A Course in Large Sample Theory, Ferguson 是很好的教本,
Asymptotic Statistics, A. W. van der Vaart
Elements of Large Sample Theory, Lehmann
Approximation Theorems of Mathematical Statistics, Serfling

Linear Models & Regression:
Applied Linear Statistical Models, Kutner et al 或者 Introduction to Linear Regression Analysis, 3ed. Montgomery, Peck, Vining可以作为入门的Regression的教本。
C. R. Rao的Linear Statistical Inference and Its Application很值得看一看。Linear Regression Analysis, Seber & Lee写得也不错。国内写得很不错的教本是王松桂写的《线性模型引论》,科学出版社,但是稍有一些错误。

Generalized Linear Models数McCullagh & Nelder 最经典,入门可以用An Introduction to Generalized Linear Models, 3ed, Dobson & Barnett。
Generalized Linear Models: A Bayesian Perspective, Dey, Ghosh, Mallick
Categorical Data Analysis, Agresti是Categorical的经典。SAS和R做Categorical的手册都有出版,对于应用统计的research来说Categorical是很基本的。

Generalized, Linear, and Mixed Models, McCulloch & Seale
Linear Mixed Models for Longitudinal Data, Verbeke & Molenberghs
Semiparametric Regression, Ruppert, Wand, Carroll里面把nonpar & semipar和mixed model统一起来
SAS for Mixed Models, 2ed 和 Mixed Effects Models in S and S-Plus, Pinheiro & Bates 实现

An Introduction to Multivariate Statistical Analysis, T.W. Anderson
Aspects of Multivariate Statistical Theory, Muirhead
Applied Multivariate Statistical Analysis, 6ed, Johnson and Wichern 国内有第6版影印本

Bayesian Data Aanlysis, Gelman, Carlin, Stern, Rubin
Bayesian Methods for Data Analysis, 3rd edition, Carlin & Louis
Statistical Decision Theory and Bayesian Analysis, James O. Berger
Theory of Statistics, Schervish
The Bayesian Choice, Christian P. Robert
Bayesian Theory, Bernardo & Smith
Generalized Linear Models: A Bayesian Perspective, Dey, Ghosh, Mallick
MCMC比较好的书有
Markov Chain Monte Carlo in Practice, Gilks & Richardson & Spiegelhalter
Monte Carlo Strategies in Scientific Computing, Jun S. Liu
Monte Carlo Statistical Methods, Robert & Casella

Nonparametric & Semiparametric:
Semiparametric Regression, Ruppert, Wand, Carroll
Applied Nonparametric Regressions, Wolfgang H?rdle
Nonparametric and Semiparametric Models, Wolfgang H?rdle et al
Efficient and Adaptive Estimation for Semiparametric Models, Bickel et al
All of Nonparametric Statistics, Larry Wasserman
Nonparametrics: Statistical Methods Based on Ranks, Erich L. Lehmann
Generalized Additive Models, Hastie & Tibshirani
此外,推荐 Empirical Likelihood, Owen

Analysis of Longitudinal Data, Diggle, Heagerty, Liang, Zeger
Applied Longitudinal Analysis, Fitzmaurice, Laird, Ware
Linear Mixed Models for Longitudinal Data, Verbeke & Molenberghs
Missing Data & Causal Inference 比较好的书有
Statistical Analysis with Missing Data 2ed, Little & Rubin
Missing Data in Clinical Studies, Molenberghs & Kenward
Semiparametric Theory and Missing Data, Tsiatis
Applied Bayesian Modeling and Causal Inference from Incomplete-Data Perspectives这本书是Rubin这派几代人对causal inference的一个集成
Robins这派的东西就看paper吧,Robins & Morgan 09年也会出一本书
Unified Methods for Censored Longitudinal Data and Causality,

作者  | 2013-6-26 9:59:34 | 阅读(839) |评论(1) | 阅读全文>>

三个故事,说穿了许多人

2013-5-17 14:27:02 阅读395 评论0 172013/05 May17

(一)
甲不喜欢吃鸡蛋,每次发了鸡蛋都给乙吃。
刚开始乙很感谢,久而久之便习惯了。
习惯了,便理所当然了。
于是,直到有一天,甲将鸡蛋给了丙,乙就不爽了。
她忘记了这个鸡蛋本来就是甲的,甲想给谁都可以。为此,她们大吵一架,从此绝交。

(二)
有一年,很热的夏天,一队人出去漂流。
女孩的拖鞋在玩水的时候,把拖鞋掉下去了,沉底了。
到岸边的时候,全是晒的很烫的鹅卵石,他们要走很长的一段路。
于是,女孩儿就向别人寻求帮忙,可是谁都只有一双拖鞋。
女孩心里很不爽,因为她习惯了向别人求助,而只要撒娇就会得到满意地答复。
可是这次却没有。她忽然觉得这些人都不好,都见死不救。
后来,有一个男孩将自己的拖鞋给了她,然后自己赤脚在那晒得滚烫的鹅卵石上走了很久的路。
还自嘲说是铁板烧。
女孩表示感谢,男孩说,你要记住,没有谁是必须要帮你的。
帮你是出于交情,不帮你是应该。
女孩记住了男孩的话,自此以后学会了对施以援手的人铭记在心,并给以更大的回报。
很多时候,我们总是希望得到别人的好。
一开始,感激不尽。
可是久了,便是习惯了。
习惯了一个人对你的好,便认为是理所应当的。
有一天不对你好了,你便觉得怨怼。
其实,不是别人不好了,而是我们的要求变多了。
习惯了得到,便忘记了感恩。

(三)
傍晚,一只羊独自在山坡上玩。
突然从树木中窜出一只狼来,要吃羊,羊跳起来,拼命用角抵抗,并大声向朋友们求救。
牛在树丛中向这个地方望了一眼,发现是狼,跑走了;
马低头一看,发现是狼,一溜烟跑了;
驴停下脚步,发现是狼,悄悄溜下山坡;
猪经过这里,发现是狼,冲下山坡;
兔子一听,更是一箭一般离去。
山下的狗听见羊的呼喊,急忙奔上坡来,从草丛中闪出,一下咬住了狼的脖子,
狼疼得直叫唤,趁狗换气时,怆惶逃走了。
回到家,朋友都来了,
牛说:你怎么不告诉我?我的角可以剜出狼的肠子。
马说:你怎么不告诉我?我的蹄子能踢碎狼的脑袋。
驴说:你怎么不告诉我?我一声吼叫,吓破狼的胆。
猪说:你怎么不告诉我?我用嘴一拱,就让它摔下山去。
兔子说:你怎么不告诉我?我跑得快,可以传信呀。
在这闹嚷嚷的一群中,唯独没有狗。
真正的友谊,不是花言巧语,而是关键时候拉你的那只手。
那些整日围在你身边,让你有些许小欢喜的朋友,不一定是真正的朋友。
而那些看似远离,实际上时刻关注着你的人,在你快乐的时候,不去奉承你;
你在你需要的时候,默默为你付出、关心你的人,那才是真正的朋友。

作者  | 2013-5-17 14:27:02 | 阅读(395) |评论(0) | 阅读全文>>

Title: Speech on Communists in the State Department

2012-5-7 15:25:59 阅读938 评论0 72012/05 May7

Title: Speech on Communists in the State Department
Author: Joseph McCarthy
Year Published: 1950Joseph McCarthy's Speech on Communists in the State Department (excerpt)

Ladies and Gentlemen:

Tonight as we celebrate the 141st birthday of one of the great men in American history, I would like to be able to talk about what a glorious day today is in the history of the world. As we celebrate the birth of this man, who with his whole heart and soul hated war, I would like to be able to speak of peace in our time, of war being outlawed, and of worldwide disarmament. These would be truly appropriate things to be able to mention as we celebrate the birthday of Abraham Lincoln.

Five years after a world war has been won, men's hearts should anticipate a long peace, and men's minds should be free from the heavy weight that comes with war. But this is not such a period -- for this is not a period of peace. This is a time of the Cold War. This is a time when all the world is split into two vast, increasingly hostile armed camps -- a time of a great armaments race. Today we can almost physically hear the mutterings and rumblings of an invigorated god of war. You can see it, feel it, and hear it all the way from the hills of Indochina, from the shores of Formosa right over into the very heart of Europe itself. ...

Today we are engaged in a final, all-out battle between communistic atheism and Christianity. The modern champions of communism have selected this as the time. And, ladies and gentlemen, the chips are down -- they are truly down.

Lest there be any doubt that the time has been chosen, let us go directly to the leader of communism today -- Joseph Stalin. Here is what he said -- not back in 1928, not before the war, not during the war -- but two years after the last war was ended: "To think that the communist revolution can be carried out peacefully, within the framework of a Christian democracy, means one has either gone out of one's mind and lost all normal understanding, or has grossly and openly repudiated the communist revolution."

And this is what was said by Lenin in 1919, which was also quoted with approval by Stalin in 1947: "We are living," said Lenin, "not merely in a state but in a system of states, and the existence of the Soviet Republic side by side with Christian states for a long time is unthinkable. One or the other must triumph in the end. And before that end supervenes, a series of frightful collisions between the Soviet Republic and the bourgeois states will be inevitable."

Ladies and gentlemen, can there be anyone here tonight who is so blind as to say that the war is not on? Can there be anyone who fails to realize that the communist world has said, "The time is now" -- that this is the time for the showdown between the democratic Christian world and the communist atheistic world? Unless we face this fact, we shall pay the price that must be paid by those who wait too long.

Six years ago, at the time of the first conference to map out peace -- Dumbarton Oaks -- there was within the Soviet orbit 180 million people. Lined up on the anti-totalitarian side there were in the world at that time roughly 1.625 billion people. Today, only six years later, there are 800 million people under the absolute domination of Soviet Russia -- an increase of over 400 percent. On our side, the figure has shrunk to around 500 million. In other words, in less than six years the odds have changed from 9 to 1 in our favor to 8 to 5 against us. This indicates the swiftness of the tempo of communist victories and American defeats in the Cold War. As one of our outstanding historical figures once said, "When a great democracy is destroyed, it will not be because of enemies from without but rather because of enemies from within." The truth of this statement is becoming terrifyingly clear as we see this country each day losing on every front.

At war's end we were physically the strongest nation on Earth and, at least potentially, the most powerful intellectually and morally. Ours could have been the honor of being a beacon in the desert of destruction, a shining, living proof that civilization was not yet ready to destroy itself. Unfortunately, we have failed miserably and tragically to arise to the opportunity.

The reason why we find ourselves in a position of impotency is not because our only powerful, potential enemy has sent men to invade our shores, but rather because of the traitorous actions of those who have been treated so well by this nation. It has not been the less fortunate or members of minority groups who have been selling this nation out, but rather those who have had all the benefits that the wealthiest nation on earth has had to offer -- the finest homes, the finest college education, and the finest jobs in government we can give.

This is glaringly true in the State Department. There the bright young men who are born with silver spoons in their mouths are the ones who have been worst.

Now I know it is very easy for anyone to condemn a particular bureau or department in general terms. Therefore, I would like to cite one rather unusual case -- the case of a man who has done much to shape our foreign policy.

When Chiang Kai-shek was fighting our war, the State Department had in China a young man named John S. Service. His task, obviously, was not to work for the communization of China. Strangely, however, he sent official reports back to the State Department urging that we torpedo our ally Chiang Kai-shek and stating, in effect, that communism was the best hope of China.

Later, this man -- John Service -- was picked up by the Federal Bureau of Investigation for turning over to the communists secret State Department information. Strangely, however, he was never prosecuted. However, Joseph Grew, the undersecretary of state, who insisted on his prosecution, was forced to resign. Two days after, Grew's successor, Dean Acheson, took over as undersecretary of state, this man -- John Service -- who had been picked up by the FBI and who had previously urged that communism was the best hope of China, was not only reinstated in the State Department but promoted; and finally, under Acheson, placed in charge of all placements and promotions. Today, ladies and gentlemen, this man Service is on his way to represent the State Department and Acheson in Calcutta -- by far and away the most important listening post in the Far East.

Now, let's see what happens when individuals with communist connections are forced out of the State Department. Gustave Duran, who was labeled as, I quote, "a notorious international communist," was made assistant secretary of state in charge of Latin American affairs. He was taken into the State Department from his job as a lieutenant colonel in the Communist International Brigade. Finally, after intense congressional pressure and criticism, he resigned in 1946 from the State Department -- and, ladies and gentlemen, where do you think he is now? He took over a high-salaried job as chief of Cultural Activities Section in the office of the assistant secretary-general of the United Nations. ...

This, ladies and gentlemen, gives you somewhat of a picture of the type of individuals who have been helping to shape our foreign policy. In my opinion the State Department, which is one of the most important government departments, is thoroughly infested with communists.

I have in my hand 57 cases of individuals who would appear to be either card-carrying members or certainly loyal to the Communist Party, but who nevertheless are still helping to shape our foreign policy.

One thing to remember in discussing the communists in our government is that we are not dealing with spies who get 30 pieces of silver to steal the blueprints of new weapons. We are dealing with a far more sinister type of activity because it permits the enemy to guide and shape our policy.

This brings us down to the case of one Alger Hiss, who is important not as an individual anymore but rather because he is so representative of a group in the State Department. It is unnecessary to go over the sordid events showing how he sold out the nation which had given him so much. Those are rather fresh in all of our minds. However, it should be remembered that the facts in regard to his connection with this international communist spy ring were made known to the then-Undersecretary of State Berle three days after Hitler and Stalin signed the Russo-German Alliance Pact. At that time one Whittaker Chambers -- who was also part of the spy ring -- apparently decided that with Russia on Hitler's side, he could no longer betray our nation to Russia. He gave Undersecretary of State Berle -- and this is all a matter of record -- practically all, if not more, of the facts upon which Hiss' conviction was based.

Undersecretary Berle promptly contacted Dean Acheson and received word in return that Acheson, and I quote, "could vouch for Hiss absolutely" -- at which time the matter was dropped. And this, you understand, was at a time when Russia was an ally of Germany. This condition existed while Russia and Germany were invading and dismembering Poland, and while the communist groups here were screaming "warmonger" at the United States for their support of the Allied nations.

Again in 1943, the FBI had occasion to investigate the facts surrounding Hiss' contacts with the Russian spy ring. But even after that FBI report was submitted, nothing was done.

Then, late in 1948 -- on August 5 -- when the Un-American Activities Committee called Alger Hiss to give an accounting, President Truman at once issued a presidential directive ordering all government agencies to refuse to turn over any information whatsoever in regard to the communist activities of any government employee to a congressional committee.

Incidentally, even after Hiss was convicted, it is interesting to note that the president still labeled the expose of Hiss as a "red herring."

If time permitted, it might be well to go into detail about the fact that Hiss was Roosevelt's chief adviser at Yalta when Roosevelt was admittedly in ill health and tired physically and mentally ... and when, according to the secretary of state, Hiss and Gromyko drafted the report on the conference.

According to the then-Secretary of State Stettinius, here are some of the things that Hiss helped to decide at Yalta: (1) the establishment of a European High Commission; (2) the treatment of Germany -- this you will recall was the conference at which it was decided that we would occupy Berlin with Russia occupying an area completely encircling the city, which as you know, resulted in the Berlin airlift which cost 31 American lives; (3) the Polish question; (4) the relationship between UNRRA and the Soviet; (5) the rights of Americans on control commissions of Rumania, Bulgaria and Hungary; (6) Iran; (7) China -- here's where we gave away Manchuria; (8) Turkish Straits question; (9) international trusteeships; (10) Korea.

Of the results of this conference, Arthur Bliss Lane of the State Department had this to say: "As I glanced over the document, I could not believe my eyes. To me, almost every line spoke of a surrender to Stalin."

As you hear this story of high treason, I know that you are saying to yourself, "Well, why doesn't the Congress do something about it?" Actually, ladies and gentlemen, one of the important reasons for the graft, the corruption, the dishonesty, the disloyalty, the treason in high government positions -- one of the most important reasons why this continues -- is a lack of moral uprising on the part of the 140 million American people. In the light of history, however, this is not hard to explain.

It is the result of an emotional hangover and a temporary moral lapse which follows every war. It is the apathy to evil which people who have been subjected to the tremendous evils of war feel. As the people of the world see mass murder, the destruction of defenseless and innocent people, and all of the crime and lack of morals which go with war, they become numb and apathetic. It has always been thus after war. However, the morals of our people have not been destroyed. They still exist. This cloak of numbness and apathy has only needed a spark to rekindle them. Happily, this spark has finally been supplied.

As you know, very recently the secretary of state proclaimed his loyalty to a man guilty of what has always been considered as the most abominable of all crimes -- of being a traitor to the people who gave him a position of great trust. The secretary of state, in attempting to justify his continued devotion to the man who sold out the Christian world to the atheistic world, referred to Christ's Sermon on the Mount as a justification and reason therefore, and the reaction of the American people to this would have made the heart of Abraham Lincoln happy. When this pompous diplomat in striped pants, with a phony British accent, proclaimed to the American people that Christ on the Mount endorsed communism, high treason, and betrayal of a sacred trust, the blasphemy was so great that it awakened the dormant indignation of the American people.

He has lighted the spark which is resulting in a moral uprising and will end only when the whole sorry mess of twisted warped thinkers are swept from the national scene so that we may have a new birth of national honesty and decency in government.


Civics Online
http://www.civics-online.org

作者  | 2012-5-7 15:25:59 | 阅读(938) |评论(0) | 阅读全文>>

韩国国家教育评价院 韩国语学习电子丛书

2011-10-5 15:00:17 阅读400 评论0 52011/10 Oct5

http://www.kice.re.kr/upload/article/10144/1225701808733_ebook1.pdf

http://www.kice.re.kr/upload/article/10144/1225702112563_ebook2.pdf

http://www.kice.re.kr/upload/article/10144/1225770751919_Ebook_D55CAD6DC5B43.pdf

http://www.kice.re.kr/upload/article/10144/1225770810265_ebook_D55CAD6DC5B44.pdf

http://www.kice.re.kr/upload/article/10144/1225770857247_ebook_D55CAD6DC5B45.pdf

http://www.kice.re.kr/upload/article/10144/1225770935964_ebook_D55CAD6DC5B46.pdf

http://www.kice.re.kr/upload/article/10144/1225772010164_ebook_D55CAD6DC5B47.pdf

http://www.kice.re.kr/upload/article/10144/1225772128341_ebook_D55CAD6DC5B48.pdf

http://www.kice.re.kr/upload/article/10144/1225767453374_Ebook_D55CAD6DC5B4D68CD6541.pdf

http://www.kice.re.kr/upload/article/10144/1225767554056_Ebook_D55CAD6DC5B4D68CD6542.pdf

作者  | 2011-10-5 15:00:17 | 阅读(400) |评论(0) | 阅读全文>>

Mac OSX 命令行知识

2011-7-17 18:11:57 阅读1014 评论0 172011/07 July17

多 朋友对osx下的命令行操作挠头,估计多数是在windows时代开始接触计算机的。有dos基础的应该是看看就明白,而玩过Linux的应该是轻车熟路 了。这个贴子希望能给见到命令行就头大的兄弟一些帮助,所涉及到的命令基本限于安装kext,修改plist,更换核心 所碰到的操作。如果想进一步了解Unix的命令,再网上找些关于Linux命令的文章看,有很多。
高手们就免看了,不过希望能来挑挑毛病,再来补充两句。。。


OSX 的文件系统
OSX 采用的Unix文件系统,所有文件都挂在跟目录 / 下面,所以不在要有Windows 下的盘符概念。
你在桌面上看到的硬盘都挂在 /Volumes 下。
比如接上个叫做 USBHD的移动硬盘,桌面上会显示出一个硬盘图标,它实际在哪里呢?
在终端里执行 ls /Volumes/USBHD, 看看显示出的是不是这个移动硬盘的内容。
根目录位置是        /             核心 Mach_kernel 就在这里,  
驱动所在位置        /Systme/Library/Extensions
用户文件夹位置     /User/用户名
桌面的位置           /User/用户名/Desktop
文件通配符为星号  * 
注意:在 Unix系统中是区别大小写字符的,A.txt 不等于 a.txt。
         根目录标志 / 不是可有可无,cd /System 表示转到跟目录下的System中,而cd System 表示转到当前目录下的 System中


如何进入命令行操作模式
再图形界面下,用finder 打开 应用程序 》实用程序》终端
如果连图形界面都进不去了(比如安错了显示驱动),开机时按 F8,用-s参数启动,然后输入命令 mount  -uw /  


获得权限
为了防止误操作破坏系统,再用户状态下时没有权限操作系统重要文件的,所以先要取得root权限
sudo -s  
然后输入密码,输入密码时没有任何回显,连星号都没有,只管输完回车就行了。

基本命令


列出文件
ls 参数 目录名
例: 想看看跟目录下有什么,
       ls /
       想看看驱动目录下有什么, 
       ls /System/Library/Extensions
       参数 -w 显示中文,-l 详细信息, -a 包括隐藏文件 


转换目录
cd
  例:想到驱动目录下溜达一圈
        cd /System/Library/Extensions


建立新目录
mkdir 目录名
  例:在驱动目录下建一个备份目录 backup
          mkdir /System/Library/Extensions/backup
          在桌面上建一个备份目录 backup
          mkdir /User/用户名/Desktop/backup


拷贝文件
cp 参数 源文件 目标文件
    例:想把桌面的Natit.kext 拷贝到驱动目录中 
          cp -R /User/用户名/Desktop/Natit.kext  /System/Library/Extensions
          参数R表示对目录进行递归操作,kext在图形界面下看起来是个文件,实际上是个文件夹。
             把驱动目录下的所有文件备份到桌面backup
            cp -R /System/Library/Extensions/*   /User/用户名/Desktop/backup             


删除文件
rm 参数  文件
   例:想删除驱动的缓存        
         rm -rf /System/Library/Extensions.kextcache
         rm -rf /System/Library/Extensions.mkext
         参数-rf 表示递归和强制,千万要小心使用,如果执行了 rm -rf /   你的系统就全没了


移动文件
mv  文件  
  例:想把AppleHDA.Kext 移到桌面
        mv /System/Library/Extensions/AppleHDA.kext /User/用户名/Desktop
        想把AppleHDA.Kext 移到备份目录中
        mv /System/Library/Extensions/AppleHDA.kext /System/Library/Extensions/backup


更改文件权限
chmod 参数 权限 文件
  例:把驱动目录下所有文件设定到root读写,其他用户只读
        chmod -R 755 /System/Library/Extensions
        参数R 表示递归,755表示各用户的权限


更改文件属主
  chown 参数 用户:组  文件
  例:把驱动目录下的所有文件属主改成根用户
        chown -R root:wheel /System/Library/Extensions                     
        参数R 表示递归操作


修复整个系统中文件的权限
    diskutil repairpermissions /
    严格的说这不是一个unix 命令,而是osx一个软件,记得修改或添加的驱动就执行一次。


文本编辑
    nano 文件名
    例:编辑natit Info.plist
          nano /System/Library/Extensions/Natit.kext/Info.plist
          编辑完成后 用 Ctrl +O 存盘,Ctrl+X 退出
    另一个文本编辑软件是 vi,操作有些古怪,熟了是非常好用的,而且在所有类Unix系统中都它,走遍天下都不怕了。
运行脚本命令
    

sh 脚本文件名
    例 修改驱动后所有需要的操作存成一个脚本,以后修改了驱动后只要运行一次这个脚本就可以了,方便吧
        1. 终端中运行nano /clean
        2. 把下列代码粘贴到 nano 中
              rm -rf /System/Library/Extensions.kextcache
              rm -rf /System/Library/Extensions.mkext
              chown -R root:wheel /System/Library/Extensions
              chmod -R 755 /System/Library/Extensions
              diskutil repairpermissions /
              kextcache -k /System/Library/Extensions/
        3. Ctrl +O 存盘,Ctrl+X 退出
        4. 以后只要动了驱动,就在终端中运行一次 sh /clean



小技巧
用 Tab 键自动补齐命令
比如想到 /System 目录中去,输入 cd /Sy  然后按一下Tab 键,命令就会自动补齐成 cd /System
操作带名字中带有空格的文件和目录
空格在命令中写成 \空格, 比如要进入 My Documents,命令为 cd My\ Documents 
查看命令的详细帮助
man 命令名
比如要看看 ls 命令的详细用法,执行 man ls 



典型操作流程
(假设已经制作好清理脚本,记得每次操作前 sudo -s 获得系统权限)
假设下载了一个显卡驱动 Natit.zip,在桌面解压得到了一个Natit.kext,该怎么做呢?
为了保险起见,先把所有驱动备份了再说
mkdir /User/用户名/Desktop/backup     在桌面上建立备份文件夹
cp -R /System/Library/Extensions/*   /User/用户名/Desktop/backup  备份驱动文件
现在可以安心安装了
cp -R /User/用户名/Desktop/Natit.kext /System/Library/Extensions   把它 拷贝到系统驱动目录位置
sh /clean        执行清理脚本,操作完成
重新开机失败,进不去桌面了,发现不应该安这个驱动,怎么恢复呢?
开机按F8,用 -s 参数启动
执行 mount -uw /
rm -rf /User/用户名/Desktop/Natit.kext    删除这个驱动
sh /clean        执行清理脚本,操作完成
重启,回到原先状态了,不死心啊,没有特效怎么行呢,又听说需要修改 Natit的 Info. plist 文件才行,好,再来
cp -R /User/用户名/Desktop/Natit.kext /System/Library/Extensions   把它 拷贝到系统驱动目录位置
nano /System/Library/Extensions/Natit.kext/Info.plist               
        编辑完成后 用 Ctrl +O 存盘,Ctrl+X 退出
sh /clean        执行清理脚本,操作完成
重启,这回对了,显卡特效都有了,该弄声卡了,天知道会出什么事,得把现有成果保护好。
mkdir /User/用户名/Desktop/gooddrivers                              专为有效驱动建个目录
cp -R /System/Library/Extensions/Natit.kext   /User/用户名/Desktop/gooddrivers     备份
这个声卡要求把 AppleHDA.kext 删除和编辑 AppleAzaliaAudio.kext中的Info.plist 文件,谁知道以后会不会还用AppleHDA呢,不如暂时禁用吧。
mkdir /System/Library/Extensions/disabled         建立个禁用目录
mv  /System/Library/Extensions/AppleHDA.kext /System/Library/Extensions/disabled         移动过去
nano /System/Library/Extensions/Natit.kext/AppleAzaliaAudio.kext/Info.plist               
     编辑完成后 用 Ctrl +O 存盘,Ctrl+X 退出
sh /clean        执行清理脚本,操作完成
成功了,也把修改好的驱动备份一下把。

今天听说修改18个驱动文件,能把cpu超到80G,内存翻5翻,Adsl变光纤,照着修改了,结果启动不了,nnd,忘了今天是四月1日了,驱动也改乱套了,是不是要重新安了?
没关系,不是备份了所有驱动文件么
开机按F8,用 -s 参数启动
执行 mount -uw /
rm -rf /System/Library/Extensions/*                    既然乱了,通通干掉
cp -R /User/用户名/Desktop/backup/* /System/Library/Extensions/              把原始驱动拷贝回来
cp -R /User/用户名/Desktop/gooddrivers/* /System/Library/Extensions/        把修改好的驱动拷贝回来
sh /clean        执行清理脚本,操作完成
哇哈哈哈,我的宝贝系统又活过来了。

QuartzGL


终端输入:sudo defaults write /Library/Preferences/com.apple.windowserver QuartzGLEnabled -boolean YES


如果打开了Quartz 2D Extreme之后发现对系统有负面影响,
也可以关闭它。方法是把上面命令行最后那个“yes”改为“no”





Mac OS X 启用超级用户的方法 

Root user,又名超级用户,是一个权力最高的
Unix 账户,Root 的账户能在整个系统里任何部份进行任何“操作”,包括:拷贝档案、移动/移除档案、执行程序等。所以,通常 Root 的账户都只会指派给高级专业的用户使用。因此,苹果把Root user 隐藏在Mac OS X 里。 
但有时候我们不得不启用Root用户以便于实现某些操作,可以通过以下三种方法把启动Root账户。 
方法一: 
把Mac OS X 的安装光盘放入到光驱中,用光盘启动系统,在安装菜单里选择“Password Reset”选项,便能更改你的密码和启动超级用户模式。(把这工具拷贝到硬盘中是不能启动的,一定要从光盘启动才有效。) 
方法二: 
在Mac OS X里启动Terminal(在“应用程序/实用工具”的文件夹中),输入以下命令: 
sudo passwd Root 
系统会实时要求输入 Root user的新密码,然后再输入一次,以确保密码正确。 
方法三: 
启动NetInfo Manager应用程序(在“应用程序/实用工具”的文件夹中),再依照以 下步骤: 
1. 从菜单中选择“域”→“用户”→“启动Root用户” 
2. 点按窗口底部的“锁状”按钮,然后输入在安装过程中提供的用户名称和密码注册。 
3. 从窗口下半部份的列表中选择 * 号一栏,再输入 Root user 已加密的新密码。 
可在 Terminal 里输入以下的「htpasswd」命令来产生加密的新密码: 
[localhost:~] currentuser% htpasswd -nb anylogin yourpassword 
[return] 
[localhost:~] currentuser% anylogin : pu9fQgdzVHRB2 
pu9fQgdzVHRB2 就是已加密的新密码 
4. 点按窗口底部的“锁状”按钮,然后储存更改和离开 NetInfo Manager。 
现在可以在 Terminal 里试试 Root user 的新密码
如何通过终端命令删除Finder中无法删除的文件 
这里我先介绍一个经常性的问题。有人常常因为某种原因。比如死机、文件下载一半意外退,这时经常有文件无法删除,系统提示你权限不够。这个时候我们就可以利用一行简单的命令进行删除。 

当然有人会提出启动到os 9来删除,这样有两大问题。一是你需要重启两次机。先切到9。再切回x。还有就是对新机器来说,你根本就没办法从os 9启动。 

言归正传,下面就举便说明: 
1 打开终端应用程序 

2 输入命令:sudo rm -r -f “你要删除的文件” 
还要注意终端命令是区分大小写的,全部小写。 

3 把你要删的文件或者文件夹用mouse拖进终端窗口,好多个也可以一起拖。 

4 然后在终端中回车 

5 输入当前管理员用户密码。如果没有密码就直接回车。注意不是root账号的密码。 

6 终端中没有任何提示信息表明成功删除。 

注意:如果用这个命令还无法删除,有两种可能性:一是你删除的是系统正在使用的临时文件之类的。二是有可能你的硬盘目录出现问题。这时请先用磁盘工具检查一下你的硬盘。 

解释: 
sudo 临时执行root账户操作,当你使用这个命令的时候等同于使用 root 用户进行操作,所以要当心。它后面一般是你要操作的其它命令。比如本例中的 rm。同时sudo 命令都要求你输入当前管理员用户密码。如果密码为空就直接回车。 

rm 删除命令。即remove的缩写,它后面有两个参数。 
-r 删除文件夹内的子文件夹及内容,一般情况下rm只能删 除文件或者空的文件夹。 
-f 强制删除参数 
如果需要了解rm命令的更多参数。请输入:man rm

作者  | 2011-7-17 18:11:57 | 阅读(1014) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018

注册 登录  
 加关注