vi

前言

正文

vi

  • 插入文本类命令
    L :光标移至屏幕最后行 
    i :在光标前 
    I :在当前行首 
    a:光标后 
    A:在当前行尾 
    o:在当前行之下新开一行 
    O:在当前行之上新开一行 
    r:替换当前字符 
    R:替换当前字符及其后的字符,直至按ESC键 
    s:从当前光标位置处开始,以输入的文本替代指定数目的字符 
    S:删除指定数目的行,并以所输入文本代替之 
    ncw或nCW:修改指定数目的字 
    nCC:修改指定数目的行 
    

ssh 工具

xxd make a hexdump or do the reverse.

  • allintext: xxd 加密邮箱地址
  • -r -revert reverse operation: convert (or patch) hexdump into binary.
<!-- 将当前16进制文本转换回文本格式 -->
 Use the combination -r -p to read plain hexadecimal dumps without line number
  • xxd -i
<!-- output in C include file style. A complete static array definition is written (named after the input file), unless xxd reads from stdin. -->
 xxd -i data.bin
  • 结合vi 进行使用
<!-- opened a binary file use this Vim command to run xxd over the contents of the opened file: -->
:%!xxd
<!-- Make your edits, then revert the file like so before saving: -->
:%!xxd -r
  • -p output in postscript continuous hexdump style. Also known as plain hexdump style. 格式化输出
将自己的邮件文本信息,转为16进制的例子
<!-- devzkndeMacBook-Pro:work devzkn$ echo "00000000: 7a68 616e 675f 6b6e 4069 636c 6f75 642e 00000010: 636f 6d0a" |xxd -r -p -->
zhang_kn@icloud.com

<!-- devzkndeMacBook-Pro:work devzkn$ echo "zhang_kn@icloud.com" | xxd -p -->
7a68616e675f6b6e4069636c6f75642e636f6d0a

<!-- devzkndeMacBook-Pro:work devzkn$ echo 7a68616e675f6b6e4069636c6f75642e636f6d0a |xxd -r -p -->
zhang_kn@icloud.com

ascii

  • devzkndeMacBook-Pro:repo devzkn$ cat /usr/share/misc/ascii
<!-- 打印出八进制、十六进制和十进制的ASCII码表 -->
devzkndeMacBook-Pro:repo devzkn$ man ascii

find

  • xargs

<!-- 查看目录下所有文件内容中是否包含某个字符串 -->
Wl42:/Library/MobileSubstrate/DynamicLibraries root# find .|xargs grep -ri "/var/mobile/Library/Caches/com.apple."


mdfind

mac上特有的命令 ,使用Spotlight索引。

  • mdfind -name
devzkndeMacBook-Pro:work devzkn$ mdfind -name ldid
/Users/devzkn/Downloads/ldid
/Users/devzkn/Library/Application Support/CrashReporter/ldid_11E531F5-61B7-5526-8FE8-B373108EFF0B.plist

  • example
devzkndeMacBook-Pro:work devzkn$ mdfind
mdfind: no query specified.

Usage: mdfind [-live] [-count] [-onlyin directory] [-name fileName | -s smartFolderName | query]
list the files matching the query
query can be an expression or a sequence of words

	-attr <attr>      Fetches the value of the specified attribute
	-count            Query only reports matching items count
	-onlyin <dir>     Search only within given directory
	-live             Query should stay active
	-name <name>      Search on file name only
	-reprint          Reprint results on live update
	-s <name>         Show contents of smart folder <name>
	-0                Use NUL (``\0'') as a path separator, for use with xargs -0.

example:  mdfind image
example:  mdfind -onlyin ~ image
example:  mdfind -name stdlib.h
example:  mdfind "kMDItemAuthor == '*MyFavoriteAuthor*'"
example:  mdfind -live MyFavoriteAuthor

locate

这个命令可以快速查找由updatedb生成的索引。与Mac的mdfind 类似

  • locate
usage: locate [-0Scims] [-l limit] [-d database] pattern ...

default database: `/var/db/locate.database' or $LOCATE_PATH

cal

  • cal -3 looking near the end or beginning of a month.
  • Usage
Usage: cal [general options] [-hjy] [[month] year]
       cal [general options] [-hj] [-m month] [year]
       ncal [general options] [-hJjpwy] [-s country_code] [[month] year]
       ncal [general options] [-hJeo] [year]
General options: [-NC3] [-A months] [-B months]
For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]

  • cal
<!-- 日历 -->
devzkndeMacBook-Pro:repo devzkn$ cal
     March 2018       
Su Mo Tu We Th Fr Sa  
             1  2  3  
 4  5  6  7  8  9 10  
11 12 13 14 15 16 17  
18 19 20 21 22 23 24  
25 26 27 28 29 30 31  

bc - An arbitrary precision calculator language

od – octal, decimal, hex, ASCII dump

see also

iOS 11:
LiberIOS (iOS 11.0-11.1.2), 64-bit devices, http://newosxbook.com/liberios/
Electra (iOS 11.0-11.1.2), 64-bit devices, https://coolstar.org/electra/
  • what-is-github
    1、GitHub的协同模式 collaborate on code with other people: Pull Request、git format-patch命令将本地提交转换为补丁文件或补丁文件序列,
    

转载请注明: > vi

在操作过程或者文章有问题的话欢迎在 原文 里提问或指正。

赞赏支持

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少
最近的文章

GoogleHacking

前言使用Google 快速精准的找到所需要的文章、电影,以及在渗透检测过程中省时省力。正文 intext:ReverseEngineering 搜索冒号后接的一个关键字https://www.reddit.com/r/ReverseEngineering/ allintext:ReverseEngineering 能接多个关键字,能与其他操作符混合使用 intitle:ReverseEngineering intext:ios ...…

Search继续阅读
更早的文章

how_to_host_cydia_repo

前言将 Tweak 部署到大量设备上和更新的解决方案是搭建私有Cydia源 ;而非通常的make package install 、dpkg -i; Cydia 由 Jay Freeman(saurik)和他的公司开发,用于安装、管理越狱设备上的第三方软件、插件。它移植了Debian上的包管理器dpkg并提供了图形化前端,方便普通用户使用。Cydia 中还有个 Cydia Store,提供付费的第三方应用。 CydiaSubstrate iOS7 之前也叫Mobi...…

iOSre继续阅读
更多