Time of Update: 2018-12-07
上篇文章我說道,windows為了改變使用者對其console介面的詬病,於是就從windows vista開始,計劃要改變這種局面,於是就有了Powershell的出現。1、相容shell命令 為了相容Unix/Linux Shell(主要是bash)的命令;Powershell中提供了一套機制來相容cmd.exe和bash命令。這就是上篇文章中提到的別名機制。是powershell中相容的cmd命令和unix/linux
Time of Update: 2018-12-06
文章目錄 利用top取某個進程的CPU的指令碼:添加使用者:統計IP訪問:求2個數之和文本分析檔案整理列印原生交換分區大小輸出本機建立20000個目錄所用的時間列印當前sshd的連接埠和進程id列印root可以使用可執行檔數編譯目前的目錄下的所有.c檔案:將一目錄下所有的檔案的副檔名改為bak 空間管理 您的位置: 51Testing軟體測試網 » Plight » 日誌廣交好友~~ 想要討論的可以留下msn~~~
Time of Update: 2018-12-06
The issue is that in W2K3 Telnet server (tlntsvr.exe) no longer runs as LocalSystem and needs to run the CMD process (cmd.exe) using the credentials of the logged in user. If Secondary Logon Service is not started, telnet server process cannot
Time of Update: 2018-12-07
iPhone5昨天發布後,並沒有帶來大家期待的無線充電技術,所以還是要繼續老老實實用回充電器。用充電線充電有一個缺點,有時候我們會忘了帶充電線,萬一剛好遇到手機沒電就比較麻煩了。今天小編給大家介紹一個名為Lynk的iPhone外殼,將一條USB充電線去巧妙收納在iPhone殼內,走到哪帶到哪,隨時隨地都能充電。Lynk僅厚兩毫米,非常簡單易用,只需從iPhone殼中抽出充電線,接上手機,接上USB電源就可以快速充電了。USB介面讓Lynk能在大多數地方充電,一開始小編還擔心資料線太短無法在電腦主
Time of Update: 2018-12-07
此備份指令碼整理自網路,再此只是添加了些注釋。此指令碼思路清晰,稍做更改便可應用到生產機上。 1 #!/bin/bash 2 ####################################################################### 3 # 4 # 備份策略: 5 # 每周日淩晨做0級備份, 6 # 每周一,四做一級備份, 7 # 每周二,三,五,六做二級備份, 8 # 00 4 * * 0 /u01/app/
Time of Update: 2018-12-07
在shell中常用的特殊符號羅列如下:# ; ;; . , / \ 'string'| ! $ ${} $? $$ $* "string"* ** ? : ^ $# $@ `command`{} [] [[]] () (()) || && {xx,yy,zz,...}~ ~+ ~- & \<...\> + - %= == !=輸出/輸入重導向> >> < << : > &> 2&>
Time of Update: 2018-12-07
第 7 章 條件陳述式 目錄7.1. 介紹if 7.1.1. 概要 7.1.2. if的簡單應用 7.2. 更多if的進階使用方法 7.2.1. if/then/else結構 7.2.2. if/then/elif/else結構 7.2.3. if嵌套語句 7.2.4. 布爾操作 7.2.5. 使用exit語句和if 7.3. 使用case語句 7.3.1. 簡單的條件 7.3.2. 初始指令碼例子 7.4. 總結 7.5. 練習 摘要本章我們會討論在Bash指令碼中使用條件,包含以下幾個話題:
Time of Update: 2018-12-06
一、變數賦值#!/bin/basha="hello world" # = 兩側不能有空格!echo "a is $a"unset aecho "this is ${a}nd" #變數最好用 {} 擴起來,避免混淆declare -i num1=10declare -i num2=20declare -i num3=$num1+$num2比較重要的命令:ls wc cp mv grep cut cat file read
Time of Update: 2018-12-07
chmod命令是非常重要的,用於改變檔案或目錄的存取權限。使用者用它控制檔案或目錄的存取權限。該命令有兩種用法。一種是包含字母和操作符運算式的文字設定法;另一種是包含數位數字設定法。1. 文字設定法chmod [who] [+ | - | =] [mode] 檔案名稱? 命令中各選項的含義為:操作對象who可是下述字母中的任一個或者它們的組合:u 表示“使用者(user)”,即檔案或目錄的所有者。g 表示“同組(group)使用者”,即與檔案屬主有相同組ID的所有使用者。o
Time of Update: 2018-12-07
轉自:http://aaronw.me/static/779.html這是第一種方法:(標點符號會漏掉)#!/bin/shawk ‘BEGIN {hextab=”0123456789ABCDEF”for ( i=1; i<=255; ++i ) ord [i] = sprintf(“%c”,i);}{decoded = “”for ( i=1; i<=length ($0); ++i ) {c = substr ($0, i, 1)if ( c ~ /[a-zA-Z0-9.-]/ )
Time of Update: 2018-12-07
以前在機器的grub資訊丟失或者損壞時,用rescue模式進入然後再grub-install /dev/sda重新安裝一下。由於某種原因grub-install /dev/sda在執行時會出現或多或少的問題。我們還可以用另一種方式代替那就是 進入grub shell模式。如下 : GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported.
Time of Update: 2018-12-06
zz:http://doc.linuxpk.com/80440.htmlsed ( stream editor ) 用法: 1. 是一個非互動性文字資料流編輯器。它編輯檔案或標準輸入匯出的文本拷貝。 2. 通過行號或Regex指定要改變的文本行 3. sed不與初始檔案打交道,而只與它的一個拷貝打交道,如果操作結果沒有重新導向到一個檔案,那麼將輸出到螢幕。 調用方式: a. 命令列方式
Time of Update: 2018-12-07
寄件者 Shadingfrom PIXAR's paper寄件者 Shading This slice of hair shell is based on FMM (Fast Marching Method) to obain a level set function in order to get a "imaginary" curve normal for hair shading similar to "Volumetric Methods for Simulation and
Time of Update: 2018-12-07
最近在搞Unix Shell的東西,在這個過程中看了不少書籍資料,也受了不少折騰,因此這裡把一些需要注意的細節記錄下來以作備忘和提醒。這裡的Shell是指Bourne Shell,其它類型的Shell我沒有用過因此不知道是否存在相同問題。另外Unix Shell的基礎資料這裡也不多介紹,其實網上的相關資料是比較散,加之Shell本身牽扯的東西也比較多,其中包括Unix的系統知識,不同版本Shell的文法和功能,Regex,管道什麼,要一次說清楚也不容易。這裡推薦一本書《UNIX
Time of Update: 2018-12-07
if-fi#! /bin/bash# 刪除檔案 和 建立檔案file=readmefunction delFile(){ if [ -e ./$file ];then rm -f ./$file echo "del $file ..." fi}function addFile(){ if [ ! -f ./$file ];then touch $file echo "add $file ..."
Time of Update: 2018-12-07
shell字串的截取的問題:一、Linux shell 截取字元變數的前8位,有方法如下:1.expr substr “$a” 1 82.echo $a|awk ‘{print substr(,1,8)}’3.echo $a|cut -c1-84.echo $5.expr $a : ‘\(.\\).*’6.echo $a|dd bs=1 count=8 2>/dev/null二、按指定的字串截取1、第一種方法:${varible##*string}
Time of Update: 2018-12-07
args.txt#! /bin/bash if [ -z $1 ] || [ ! -e $1 ] thenecho "Usage: cmd.sh input "exitfiecho $0for num in $*;do echo "$num"done for i in $(seq -3 $#); do echo $i done for i in {0..5} do echo $i done echo $@ for((i=4;i<7
Time of Update: 2018-12-07
家目錄下的設定檔.bashrc中rc的含義是resource configuration什麼是登陸shell?什麼是非登陸shell?登陸shell是指:(1)使用者登陸時,輸入使用者名稱和密碼後啟動的shell;(2)通過帶--login參數的命令:bash
Time of Update: 2018-12-07
Bash Shell 快速鍵的學習使用作者: Fenng | 可以轉載, 轉載時務必以超連結形式標明文章原始出處和作者資訊及著作權聲明網址: http://www.dbanotes.net/techmemo/shell_shortcut.html 這篇 Bash Shell Shortcuts 的快速鍵總結的非常好。值得學習。下面內容大多數是拷貝粘貼與總結.">CTRL 鍵相關的快速鍵:Ctrl + a - Jump to the start of the lineCtrl + b -
Time of Update: 2018-12-07
-rw-r--r-- Access rights to the file.The first character indicated the type of file. a leading dash means a regular file, while a 'd' indicates a directory. the next three characters