Time of Update: 2018-12-07
詳文請見 VLoveIYhttp://ffown.sinaapp.com/?p=40CPU name : Intel(R) Xeon(R) CPU E5405 @ 2.00GHzprocessor : 4cpu MHz : 1995.021IPC latency:IPC TYPE: MessageSize: Average Latency:unix socket 10K 9uslocalhost tcp 10K 11uspipe 10K
Time of Update: 2018-12-07
1. Souce 解析 config 檔案嘗試到Linux 的設計的好處,直接可以把config 檔案當作指令碼來執行。configure 檔案,一般都是一些索引值對,對於強型別語言C /C#,一個簡單的設定檔,需要程式去解釋,去讀。 但是再shell 裡面,這些變的太簡單,設定檔,也就是代碼。 舉例:## Where deploy output is storedLOG_DIR=log## The directory to perform the Perforce syncP4_ROOT=~
Time of Update: 2018-12-07
簡單的說,window檔案換行是 “/r/n”, 而Linux檔案的換行是 “/n”, 所以將檔案從window 下直接複製到 Linux 和就有問題。 用vim 開啟揮發現 ^M 的字元在每一行尾。 但是好多軟體,會直接去處理這些區別。 比如notepad++, 會開啟檔案如果發現是“/r” 或者是“/r/n” 都會顯示新行。 perforce 也對此有處理,比如先將檔案從window下提交到perforce,然後再從perforce同步到Linux/Unix平台下, perforce
Time of Update: 2018-12-07
There are different way and different level of communication between window and Linux, such as VNC and rdesktop for GUI login ( like mstsc for window platform).But the other way ssh is much easier to use. Window install ssh server (such FreeSSHd )
Time of Update: 2018-12-07
#/home目錄由邏輯卷/dev/mapper/VolGroup01-LogVol00掛載,並用佔用空間4.8G,現在需要減少佔用空間[root@localhost /]# df -h /dev/sda1 3.8G 638M 3.0G 18% / /dev/mapper/VolGroup01-LogVol00 4.8G 138M 4.4G 4% /home
Time of Update: 2018-12-07
轉載LYJ:http://blog.chinaunix.net/space.php?uid=14617649&do=blog&id=3058661一、時間類型。Linux下常用的時間類型有4個:time_t,struct timeb, struct timeval,struct timespec,clock_t, struct tm.(1) time_t是一個長整型,一般用來表示用1970年以來的秒數.該類型定義在<sys/time.h>中.一般通過 time_t
Time of Update: 2018-12-07
無論是個人興趣還是工作的需要,最近都需要從Windows上面跑到Linux下面。在Windows下面搞開發是我最熟悉的事情,一台新機器安裝上Visual Studio + VAssistx + SVN/Ankhsvn + UltraEdit +
Time of Update: 2018-12-07
命令經常用,再次記錄以下。 Window access the Linux share folder. 1. Create the smb account. Then you can use this username to access the Linux share folder. smbpasswd -a username Share folder in Ubuntu, you need to install smb. Linux access the window
Time of Update: 2018-12-07
Linux terminal 或許是Linux 上最頻繁用到的工具之一。有個用的順手的命令列,大大提高工作生活效率。下面來看看:1. 命令列提示符號 通過定義一組預先定義好的一組值,以及控制PS1 和PS2 環境變數來控制提示符號. echo $PS1 通過修改直接生效。比如讓命令列來顯示命令的行號。 export PS1="\#" 來顯示命令列號 可以通過man bash 開查看,搜key world: PS12. tab 補全
Time of Update: 2018-12-07
linux 軟體頒發時候,防止被人給篡改,不僅提供一個軟體包還提供一個認證。下面介紹md5sum 命令,怎麼產生和驗證安全。 1. 產生md5 驗證碼sh-3.2$ md5sum testd73e296044c73cee29af0c08be61f091 *test 可以將產生的驗證碼儲存到檔案(!!切忌驗證碼和檔案名稱之間有兩個空格), 比如md5.txt2. 驗證檔案:sh-3.2$ md5sum -c md5.txtperf.log:
Time of Update: 2018-12-07
Linux 上面有太多的工具,怎樣快速找到一個自己想要的工具。第一步:1. 用關鍵字搜尋man 的手冊。man -k "keyword"apropos ""keyword" 2. 用關鍵字在源裡面去搜尋。apt-cache search "keyword" 前兩部可以用grep 去過濾關鍵字。3. 當然郵件組,reddit.com, google, find your the expert in the related field.第二部:讀文檔。 1. 可能可以借用 whatis 命令,
Time of Update: 2018-12-07
眾所周知, Linux 動態庫的預設搜尋路徑是 /lib 和 /usr/lib 。動態庫被建立後,一般都複製到這兩個目錄中。當程式執行時需要某動態庫, 並且該動態庫還未載入到記憶體中,則系統會自動到這兩個預設搜尋路徑中去尋找相應的動態庫檔案,然後載入該檔案到記憶體中,這樣程式就可以使用該動態庫中的函 數,以及該動態庫的其它資源了。在 Linux 中,動態庫的搜尋路徑除了預設的搜尋路徑外,還可以通過以下三種方法來指定。 方法一:在設定檔 /etc/ld.so.conf
Time of Update: 2018-12-07
上一篇文章說到用cywin 在window上面調用linux 的命令(不是Linux命令本身,而是Linux命令對應的window 的類比命令), 並且使得linux 命令與window 的Dos命令 結合起來,貌似功能強大。恰好有這麼一個需求,需要自動化做一個批量轉換,而轉換器只有window版本的。 本來可以用batch 或者python,但是想試試cywin調用window 的命令的強大。結果悲劇產生了。1. window上面的斷行符號換行與Linux 不一樣。
Time of Update: 2018-12-07
對動態庫的實際應用還不太熟悉的讀者可能曾經遇到過類似“error while loading shared libraries”這樣的錯誤,這是典型的因為需要的動態庫不在動態連結器ld.so的搜尋路徑設定當中導致的。 具體說來,動態連結器ld.so按照下面的順序來搜尋需要的動態共用程式庫: 1.ELF可執行檔中動態段中DT_RPATH所指定的路徑。這實際上是通過一種不算很常用,卻比較實用的方法所設定的:編譯目標代碼時,可以對gcc加入連結參數“-Wl,-rpath”指定動態庫搜尋路徑;
Time of Update: 2018-12-07
http://www.top-e.org/jiaoshi/html/?377.html從Linux 2.6起引入了一套新的驅動管理和註冊機制:platform_device和platform_driver。Linux中大部分的裝置驅動,都可以使用這套機制,裝置用platform_device表示,驅動用platform_driver進行註冊。Linux platform driver機制和傳統的device driver
Time of Update: 2018-12-07
Linux中的tty與pts [轉]6394733752008-8-11 15:54:57 收藏 | 列印 | 投票(6) | 評論(0) | 閱讀(23803) ◇字型:[大 中 小]tty一詞源於Teletypes,或者teletypewriters,原來指的是電傳打字機,是通過串列線用印表機鍵盤通過閱讀和發送資訊的東西,後來這東西被鍵盤與顯示器取代,所以現在叫終端比較合適。
Time of Update: 2018-12-07
--by FeCen 在學習Linux驅動的過程中,遇到一個很好玩的核心功能,準確的說是一個很好玩的宏,叫做container_of。該宏定義在include/linux/kernel.h中,首先來貼出它的代碼:439/**440 * container_of - cast a member of a structure out to the containing structure441 * @ptr: the pointer to the member.442 * @type:
Time of Update: 2018-12-07
參考 http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.htmlgcc -fPIC -g -c -Wall a.cgcc -fPIC -g -c -Wall b.cgcc -shared -Wl,-soname,libmystuff.so.1 \ -o libmystuff.so.1.0.1 a.o b.o –lc makefileCC = gcc CXX = g++
Time of Update: 2018-12-07
ChinaUnix.net--手冊中心http://man.chinaunix.net/ uclibc上的連結,有空研究一些Other libcs uClibc++ BusyBox buildroot Scratchbox OpenEmbedded uCdot LinuxDevices Slashdot Freshmeat Linux Today Linux Weekly News Linux HOWTOs linux howtohttp://man.chinaunix.net/linux/
Time of Update: 2018-12-07
Linux 如何解決共用庫的版本控制 Linux 系統,也同樣面臨和Window一樣的問題,如何控制動態庫的多個版本問題。Window之前沒有處理好,為此專門有個名詞來形容這個問題 “Dll hell”,其嚴重影響軟體的升級和維護。 Dll hell 是指windows 上動態庫新版本覆蓋舊版本,但是卻不相容老版本。常常發生在程式升級之後,動態庫更新,原有程式運行不起來;或者裝新軟體,但是已有的軟體運行不起來。 同樣Linux作業系統,也有同樣的問題,那麼它是怎麼解決的呢?Linux