分类 电脑黑科技 下的文章
echo 指令向文件写入内容
一. echo指令基本用法
用法:echo [短选项]... [字符串]... 或:echo 长选项 将 STRING 回显到标准输出。 -n 不尾随换行符 -e 启用解释反斜杠的转义功能 -E 禁用解释反斜杠的转义功能(默认) --help 显示此帮助信息并退出 --version 显示版本信息并退出 若-e 可用,则以下序列即可识别: \\ 反斜杠 \a 响铃声 \b 退格 \c 不再产生新的输出 \e 转义符 \f 换页 \n 新行 \r 回车 \t 水平制表符 \v 竖直制表符 \0NNN 字节数以八进制数 NNN (1至3位)表示 \xHH 字节数以十六进制数 HH (1至2位)表示
CentOS 7 SSD 优化 减少磁盘写入
起因,无意间查看磁盘的SMART信息,发现SSD写入了1.59TB.读取才320G.这才仅仅过了68天.这样下去128G的SSD.迟早会不能写入数据的.目的!!减少无用的写入动作!!
首先看一下磁盘信息
Supervisor安装与配置 | Linux/Unix进程管理工具
Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意外被杀死,supervisort监听到进程死后,会自动将它重新拉起,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制。
因为Supervisor是Python开发的,安装前先检查一下系统否安装了Python2.4以上版本。下面以CentOS7,Python2.7版本环境下,介绍Supervisor的安装与配置步聚:
安装supervisor
$ yum -y install python-setuptools $ easy_install supervisor
mktorrent Win下命令行制作种子
工具下载:
GitHub : q3aql/mktorrent-win
version 1.1
Creating a torrent
- To make a .torrent file using command line, execute this command:
mktorrent -v -p -a http://tracker.url -o filename.torrent folder_name
-v is for verbose -p is for private, as in not DTH or PeerExchange -a is for tracker url follows -o is for output file name follows .
- Important! The command needs to be all in one line, and quotes must
be used around the folder name if it contains spaces. - For example, if I wanted to make a torrent for What.cd from the data
in the "VA – Summer Trance 2009" directory I already have on my
server at ~/torrents/completed/VA - Summer Trance 2009, you would
navigate to the parent directory to make your torrent. Type to
navigate to it:
Note: The disks must be written with the format
/cygdrive/<letter>/. For example,
C:is
/cygdrive/c/.
CentOS 7 编译 OpenCC (Open Chinese Convert)
GitHub: BYVoid/OpenCC
Emmm...一键安装~
yum install gcc-c++ cmake doxygen libnet-devel doxygen --version 1.8.5 wget https://github.com/BYVoid/OpenCC/archive/ver.1.0.5.tar.gz tar zxf ver.1.0.5.tar.gz cd OpenCC-ver.1.0.5/ make make install ln -s /usr/lib/libopencc.so.2 /usr/lib64/libopencc.so.2