Time of Update: 2018-07-26
一、bash內部變數: 常見的內部命令:echo,eval,exec,export,readonly,read,shift ,wait,exit和點(.)也就是source命令。 命令 作用 echo 變數名 將變數名表指定的變數顯示到標準輸出 eval 讀取一連串的參數,然後再依參數本身的特性來執行 exec命令參數
Time of Update: 2018-07-21
本文參考了http://www.docin.com/p-56167731.html 上的例子 1.統計一個檔案的行數可以用以下命令: grep -c "" xxx.txt 或 grep -n "" xxx.txt | wc -l ___________________________ PS: 使用grep -n “” xxx.txt 可以對 xxx.txt
Time of Update: 2018-07-23
備份策略: 每周日做一全備,每天做一增量備份。 一:全備指令碼 cat xtrabackup_full.sh #!/bin/bash local_ip="$(/sbin/ifconfig eth0|grep 'inet addr'|awk -F : '{print $2}'|cut -d ' ' -f1)" email='pingping1990429@163.com' user='root'&
Time of Update: 2018-07-24
1.寫在開始 最近在學習梆梆殼,在調試的過程中遇到了反調試,很是苦惱,而且每次調試都會被中斷,朋友發了篇文章【1】介紹了其中的一個反調,學習後收穫頗多,給我指明了方向,接下來再對其他反調試進行補充,若有疏漏之處請各位大佬批評指正。 2.反調試之時間軸程檢測 啟動調試後是對文章【1】的驗證,過程大致如下: 運行brpt.py後一路F9, ...#下斷點# 記憶體中擷取模組基地址base = FindModule('linker');#.text:00002464
Time of Update: 2018-07-26
同時讀取兩個檔案,並且把他們同行 合并到一個行 寫到一個合并的檔案中 shell指令碼: #!/bin/bash#set -xcd `dirname "$0"`/../INAS_SCRIPT_ROOT=`pwd`function make_if_no_existis_dir(){ local dir=$1 if [ ! -e "${dir}" ] then mkdir -p "${dir}
Time of Update: 2018-07-26
-s file 檔案大小非0時為真[ -f "somefile" ] :判斷是否是一個檔案[ -x "/bin/ls" ] :判斷/bin/ls是否存在並有可執行許可權[ -n "$var" ] :判斷$var變數是否有值[ "$a" = "$b" ] :判斷$a和$b是否相等 -r file 使用者可讀為真-w file 使用者可寫為真-x file
Time of Update: 2018-07-26
#!/bin/bash function ergodic(){ for file in ` ls $1 ` do if [ -d $1"/"$file ] then ergodic $1"/"$file else echo $1"/"$file >> b fi done } INIT_PATH="/etc/httpd" ergodic $INIT_PATH
Time of Update: 2018-07-30
登入與非登入shell的: 區分:是否需要輸入使用者名稱密碼。 轉換: 非登入可以轉換成登入 使用--login 考慮轉換情況,相對科學的區分:既不使用密碼,也不使用--login轉換的是非登入,其他都是登入。 登入與非登入運行shell的區別: 對於Bash來說,登入shell會首先讀取和執行/etc/profile全域設定檔中的命令,然後依次尋找~/.bash_profile、~/.bash_login 和
Time of Update: 2018-08-20
Question:有時候用scrapy shell來調試很方便,但是有時候使用scrapy shell會返回403,比如下面: C:\Users\fendo>scrapy shell https://book.douban.com/subject/26805083/ 2017-04-17 15:18:53 [scrapy.utils.log] INFO: Scrapy
Time of Update: 2018-08-21
shell編程的過程中,經常遇到要擷取檔案名稱以及檔案尾碼名的問題.一般的處理方法如下: #codefile="thisfile.txt"echo "filename:${file%.*}"echo "extension:${file##*.}"#resultfilename:thisfileextension:txt
Time of Update: 2018-08-21
spark-shell啟動的問題解決 今兒在啟動spark-shell的時候模型奇妙的出現如下幾個問題
Time of Update: 2018-08-22
shell提供了對UNIX系統的介面。收集輸入,並根據輸入執行程式。當一個程式執行完畢後,它會顯示該程式的輸出。 shell是一個環境,我們可以運行我們的命令,程式和shell指令碼。shell有不同的風格,就像有不同風格的作業系統。每個的shell的風格,有它自己的一套識別的命令和功能。
Time of Update: 2018-05-18
標籤:pytho 分享圖片 one zabbix ubunt http exploit 登入 監測 exp檢測是否存在SQL注入漏洞[email protected]:~#
Time of Update: 2018-08-21
標籤:進程 wait one ++ inux pre 關閉 ndt 參考 實現方案:1.命令結尾添加:&#/bin/bashall_num=10a=$(date +%H%M%S)for
Time of Update: 2018-12-04
some shell combinationsCTRL + L : Clear the screenCTRL + W : Delete the word starting at cursorCTRL + U : Clear the line i.e. Delete the all words from command lineTab : Auto-complete files, directory, command names and much moreCTRL + R :
Time of Update: 2018-12-03
取得 007Shell 的源碼, 編譯通不過, 看了下源碼, 改正了個小 bug, 編譯OK.在一台 Linux 上運行 "./007Shell -s", 在另一台 Linux2 上運行 "./007Shell -c -h ip_of_linux",便建立起一個隧道, client 可以操控 server.ICMP自稱可以穿越防火牆, 我便想試試是否可以穿過我 XP 系統的防火牆.將 007Shell 在 Cygwin 中編譯, 提示"欄位‘icmp’的類型不完全".發現 Cygwin 中
Time of Update: 2018-12-03
Linux/Unix shell指令碼中調用或執行SQL,RMAN 等為自動化作業以及多次反覆執行提供了極大的便利,因此通過Linux/Unix shell來完成Oracle的相關工作,也是DBA必不可少的技能之一。本文針對Linux/Unix shell指令碼調用sql, rman 指令碼給出了相關樣本。 一、由shell指令碼調用sql,rman指令碼1、shell指令碼調用sql指令碼#首先編輯sql檔案oracle@SZDB:~> more
Time of Update: 2018-12-03
一個簡單的例子:#!/bin/bashecho "What's your favourite star?"select var in "Leehom" "Vae" "Jay" "Jolin"; dobreak;doneecho "You have selected $var"運行結果:root@ubuntu:~# ./star.shWhat's your favourite star?1) Leehom2) Vae3) Jay4) Jolin#? 1You have selected
Time of Update: 2018-12-04
shell在linux中是很常用的一種解釋類型的指令碼,包含很多類型,使用範圍較廣的為bashshell ,在讀android原始碼中shell檔案隨處可見,故對此作一備忘(詳解shell都可以單獨出書了),將一些常用符號和文法記錄如下,方便尋找1.一個簡單的shell指令碼如下#!/bin/bashecho "Hello shell"備忘:1).shell指令碼在頂部必須添加#!/bin/bash,來指定所使用的shell類型2)shell指令碼副檔名.sh
Time of Update: 2018-12-04
剛學習shell,碰到問題.執行時總出錯:unexpected operator.用的是ubuntu 9.04.跟這學習鳥哥的私房菜到了shell script那一節,指令碼如下:#!/bin/bash# Program:# This program shows the user's choice# History:# 2005/08/25 VBird First