Time of Update: 2013-12-13
隨著公司網站的增多和佔用的空間越來越大,所以寫個指令碼。增量備份下 #!/bin.bash#backup 00:00:00week=`date +%u`Date=`date +%Y-%m-%d`year=`date +%Y`month=`date +%m`day=`date
Time of Update: 2013-12-13
由於系統預設安裝rsync服務,這裡我就省略如何安裝rsync安裝伺服器: mkdir -p /etc/rsyncd/ 建立rsync主目錄 touch /etc/rsyncd/rsyncd.conf 建立主設定檔touch
Time of Update: 2013-12-13
二 RSA認證方式 (一) net-to-net 串連方式 1 網路環境 Left network ß---àleft GateWay ß-----|------à Right
Time of Update: 2013-12-13
Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can help free up a lot of memory. Now you can throw away that script that allocated a ton of memory just to get rid
Time of Update: 2013-12-13
(1)兩個檔案的交集,並集前提條件:每個檔案中不得有重複行1. 取出兩個檔案的並集(重複的行只保留一份)cat file1 file2 | sort | uniq > file32. 取出兩個檔案的交集(只留下同時存在於兩個檔案中的檔案)cat file1 file2 | sort | uniq -d > file33. 刪除交集,留下其他的行cat file1 file2 | sort | uniq -u >
Time of Update: 2013-12-13
上次裝完ubuntu後,今天想在ubuntu中安裝VMware Tools,開啟終端,發現自己的ubuntu的電腦名稱老長的一串,就像下面這圖這樣,看著讓人不舒服,決定先把這個電腦名稱給改了。網上查資料,說是可以用hostname命令進行修改,hostname命令格式:hostname <新電腦名稱>-$sudo hostname
Time of Update: 2013-12-13
下載伺服器訪問量很大,前段時間重新安裝升級了apache2.2,沒有分割apache記錄檔,導致access.log和error.log檔案巨大。。。 下面分享下怎麼按照日期分割apache記錄檔,也就是每天單獨產生一個記錄檔,這樣有利於分析清除以前的日誌。先備份原來的httpd.conf開啟 Apache 的 httpd.conf設定檔找到ErrorLog logs/error.log把這行注釋掉,添加下面2行#ErrorLog "logs/error.log"#
Time of Update: 2013-12-13
Linux下SVN用戶端使用指南 svn add values/strings.xml //--添加 www.2cto.com svn st //--查看狀態 svn ci //--提交 svn ci -m "svn ci, permission" 1、 將檔案checkout到本地目錄 svn checkout
Time of Update: 2013-12-13
nginx內建變數列表,根據 Nginx 源碼檔案 ngx_http_variables.c 提取了nginx 的內建變數。根據不同的版本,變數可能有些變化,大多數還是可以用滴。名稱版本說明(變數列表來源於檔案 ngx_http_variables
Time of Update: 2013-12-13
最佳化nginx伺服器核心TCP參數 vi /etc/sysctl.conf在最後添加如下內容: www.2cto.com net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.ip_local_port_range = 2048 65000 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse =
Time of Update: 2013-12-13
簡明Linux命令列筆記5:rm rm www.2cto.com rm可以用來刪除檔案或者目錄 1.用法 rm [選項]... 檔案... 2.常用參數 -f 不提示,強制移除檔案 -r 或 -R 遞迴刪除目錄 -i 刪除檔案時進行提示 -v 刪除檔案時列印檔案名稱 www.2cto.com
Time of Update: 2013-12-13
linux ps命令參數和使用詳解 PS是LINUX下最常用的也是非常強大的進程查看命令1. ps簡介 www.2cto.com
Time of Update: 2013-12-13
ubuntu系統下wireshark普通使用者抓包設定 dumpcap需要root許可權才能使用的,以普通使用者開啟Wireshark,Wireshark當然沒有許可權使用dumpcap進行截取封包。 www.2cto.com 雖然可以使用 sudo
Time of Update: 2013-12-13
linux網路設定新手入門指南 ㈠ 網路介面 www.2cto.com ① 命名規則
Time of Update: 2013-12-13
比較詳細的ffmpeg參數功能ffmpeg項目由以下幾部分組成: www.2cto.com ffmpeg 視頻檔案轉換命令列工具,也支援經過即時電視卡抓取和編碼成視頻檔案.ffserver 基於HTTP(RTSP正在開發中)用於即時廣播的多媒體伺服器.也支援時間平移fplay 用 SDL和FFmpeg庫開發的一個簡單的媒體播放器libavcodec 一個包含了所有FFmpeg音視頻轉碼器的庫.為了保證最優效能和高可複用性,大多數轉碼器從頭開發的.libavformat
Time of Update: 2013-12-13
linux查看cpu溫度,安裝lm_sensors工具 安裝lm_sensors工具即可查看溫度了 www.2cto.com yum -y install lm_sensors rpm -qa|grep coretemp 看一下有沒有kmod-coretemp,沒有的話需要安裝這個 x86和x64的系統直接wget http://www.pperry.f2s.com/linux/coretemp/kmod-coretemp-1.1-2.el5
Time of Update: 2013-12-13
archlinux systemd開機執行rc.local Archlinux 替換initscript 為systemd方式後,許多服務啟動方式已經發生變化。原來的/etc/rc.d/rc.local已經消失,並被建議使用tmpfiles.d方式替換。但是有些操作tmpfiles.d無法替代。 www.2cto.com 需要手動寫一個rc-local.service 檔案。 vim
Time of Update: 2013-12-13
make menuconfig時提示“error opening terminal”的解決方案 Linux環境下,編譯嵌入式系統時會用到make menuconfig或make config命令,這些命令通常會使用ncurses庫,如果ncurses庫沒有安裝設定正確,可能出現如下的錯誤資訊: www.2cto.com error opening terminal
Time of Update: 2013-12-13
find精華應用 find path -option [ -print ] [ -exec -ok command ] {} \;-print 將尋找到的檔案輸出到標準輸出-exec command {} \; 將查到的檔案執行command操作,{} 和 \;之間有空格-ok
Time of Update: 2013-12-13
使用cpufreq工具給CPU臨時調整主頻 現代的CPU和主板都有節電技術,在CPU低負荷工作的會自動降頻。如果需要臨時設定主頻和工作模式,可使用cpufreq手動調整。這個模式將在重啟後失效,如果需要長期調整請修改/etc/sysconfig/cpuspeed。 www.2cto.com lsmod | grep