![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
文章平均质量分 51
江湖一分
接受一个现实:我不是个聪明的人。坚持一分 路漫漫其修远兮,吾将上下而求索。做任何事情,有节奏而不急于求成,只要一步步努力,到最后一切都会水到渠成。虚心向别人讨教,怀疑权威,打造自己。
展开
-
openstack---neutron commands list
This is got from neutron help.usage: neutron [--version] [-v] [-q] [-h] [-r NUM] [--os-service-type ] [--os-endpoint-type ] [--service-type ]原创 2016-11-07 15:43:32 · 530 阅读 · 0 评论 -
Linux--shell of "tr" command
man page of "tr"TR(1) User Commands TR(1)NAME tr - translate or delete charactersSYNOPSIS tr [_O_P_T_I_O_N]... _S_E_T_1 [_S_E_T_2]DESCRIPTION Translate, squeeze, and/or delete characters from standard原创 2016-10-17 11:14:01 · 232 阅读 · 0 评论 -
linux--how to dump man page
sometimes, it will be easy for us to check shell command in man page. if you want to dump the command description into file, you can do this:man command >comamnd.txtoccasionally, there some ga原创 2016-10-17 11:08:12 · 285 阅读 · 0 评论 -
openstack--nova help
usage: nova [--version] [--debug] [--os-cache] [--timings] [--os-auth-token OS_AUTH_TOKEN] [--os-tenant-name ] [--os-tenant-id ] [--os-region-name ]原创 2016-11-08 15:58:23 · 830 阅读 · 0 评论 -
Linux---shell rsync
1. rsync Description:DESCRIPTION rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to原创 2016-10-18 17:25:46 · 263 阅读 · 0 评论 -
Linux---the tool Mobaxterm to replace putty
lately, I have been using Mobaxterm for ssh remote servers. And it turns out I discarded the putty, because the convenience of Mobaxterm. it is tab-based windows, and you can switch between multipl原创 2016-10-28 09:29:40 · 445 阅读 · 0 评论 -
Linux-----shell 订制删除 rm
sometimes, we need to delete files according to its updating time or some other rules. Here, we take some example for such usage.For example: delete files which has been untouched more than 10days原创 2016-10-28 14:04:07 · 209 阅读 · 0 评论 -
Linux---shell 基本操作符及常见符号
基本操作符-s: Check if file has size greater than 0 if yes then condition becomes true. 实际应用中,[ -s $file ] 如果$file内容不为空,或者file其实是个folder的话,都返回true原创 2016-10-13 16:34:33 · 556 阅读 · 0 评论 -
Linux -trap
trap 命令,用来相应信号。其命令格式如下:trap "command or commands" signal-numbers(or names)note:命令或者命令组应该放在双引号内,多个命令用分号隔开,多个信号之间用空格分开trap的三种形式(1) 如果trap中命令丢失,表示脚本接受信号的默认动作(2)如果捕获信号的命令参数是空字符串,表示脚本需要忽略这些信号转载 2016-07-25 16:32:03 · 213 阅读 · 0 评论 -
Linux--shell typeset
today, I have tried typeset to declare variables with specific attribute. like typeset -l: it will turns uppercase characters in value of parameter converted to lowercase.for example: #!/b原创 2016-10-20 15:29:52 · 559 阅读 · 0 评论 -
Linux 磁盘查看常用命令 pvs lsblk
最近使用netapp 的disk array, 了解下相关磁盘查看的命令。-> /usr/sbin/pvs PV VG Fmt Attr PSize PFree /dev/mapper/mpatha1 r1vg0lun0 lvm2 a-- -> /usr/bin/lsblkNAME原创 2018-01-05 14:53:14 · 1853 阅读 · 0 评论 -
shell 中的括号们
内容为转载聚合起来的。转自:http://blog.csdn.net/jobschen/article/details/51481252 单中括号 [ ] a. [ ] 两个符号左右都要有空格分隔 b. 内部操作符与操作变量之间要有空格:如 [“a” = “b” ] c. 字符串比较中,> < 需要写成>...转载 2018-03-15 16:24:20 · 182 阅读 · 0 评论 -
shell 判断文件是否存在,-e or -f ?
Sometimes, we have met issue how to check whether one file exists using shell script.you use "-e" or "-f" ? the two of them have some different which may mislead you if you don't know their exact us...原创 2018-08-10 17:14:29 · 3473 阅读 · 0 评论 -
systemctl manual --详细的介绍
转自http://man7.org/linux/man-pages/man1/systemctl.1.htmllet's take "systemctl status rsh.socket" as example● rsh.socket - Remote Shell Facilities Activation Socket Loaded: loaded (/usr/lib/syste...翻译 2019-03-19 10:55:10 · 1155 阅读 · 0 评论 -
shell 实用tips, sed,grep正则表达式
最近用shell做个小工具,发现很多东西在使用的时候,反而没有那么清楚的印象。总结一下最近的小技巧,希望拯救下自己就贫瘠的记忆1. shell [[]]判断后,多条语句 &&2. shell 清空文件: way 1: echo "" >$file 不好,会多一行空白行 way 2: > $file 好,解决了way1的问题3. re...原创 2019-05-02 23:06:46 · 127 阅读 · 0 评论 -
【docker】 centos上安装以及使用,以及遇到的几个问题
基本上是参考菜鸟教程的http://www.runoob.com/docker/centos-docker-install.html但是遇到些问题以及解决方案。1. 安装, 命令 yum install docker yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-mana...原创 2019-05-23 14:10:31 · 291 阅读 · 0 评论 -
Linux --rpm 打包
常用的rpm命令: 查看rpm 安装信息: rpm -qa 升级rpm 程序: rpm -U rpm 卸载:rpm -e 不安装,查看rpm包里的文件: rpm -qlp *.rpmrpm 打包文档:原创 2016-08-19 15:04:41 · 596 阅读 · 0 评论 -
Linux---disk, partitions, PV, LV
It's hard for me to understand the whole disk management in Linux at first. But this page helps me a lot.http://m.blog.itpub.net/29500582/viewspace-1806993/基本概念:磁盘、分区、物理卷【物理部分】卷组【中间部分】转载 2016-10-25 09:34:27 · 506 阅读 · 0 评论 -
Linux---RAID 管理
转自http://www.ibm.com/developerworks/cn/linux/l-cn-raid/Linux 中软件 RAID 的使用在以数据为中心的信息时代,如何妥善有效地保护数据是存储系统的核心问题之一。人们可以忍受计算机宕机,所有应用程序重新启动或者硬件损坏,但是他们要求信息永远不会丢失。冗余磁盘阵列(Redundant Array of Independen转载 2016-07-26 10:41:00 · 1762 阅读 · 0 评论 -
Linux--shell 变量里的$(<) 与重定向
今天阅读程序的时候,发现有个变量的定义形式为a=$(结果变量a 的值是文件/root/sync的内容。关于shell里的左尖括号,是重定向输入,将文件内容重定向到变量a里。同时,$(cmd) 类似 与 `cmd`类似。因此,a的变量赋值也可以更改为a=`原创 2016-07-27 09:38:43 · 1699 阅读 · 0 评论 -
bash 括号(小括号,双小括号,中括号,双中括号,大括号)
小括号()和大括号{}主要包括一下几种${var} $(cmd) ()和{} $((exp)) ${var:-string},${var:+string},${var:=string},${var:?string} $(var%pattern),$(var%%pattern),$(var#pattern),$(var##pattern)1.shell变量应用原型 ${var}2转载 2016-07-27 09:47:04 · 520 阅读 · 0 评论 -
Linux--mkswap
转自http://blog.sina.com.cn/s/blog_48212cbe0100i03e.html关于swap交换分区的设置:一种流行的、以讹传讹的说法是,安装Linux系统时,交换分区swap的大小应该是内存的两倍。也就是说,如果内存是2G,那么就应该分出4G的硬盘空间作为交换空间。其实这是严重的浪费。真实的情况是:可以根据你系统内存的大小,以及所使用的程序,自行决定交换分转载 2016-07-29 15:55:19 · 2076 阅读 · 0 评论 -
Linux ---password 加密算法从md5到SHA-256/SHA-512
转自:http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-upgrading-password-hashing/isplay Current Hashing AlgorithmType the following command:# authconfig --test | grep hashingSample ou转载 2016-08-03 15:34:35 · 3858 阅读 · 0 评论 -
Shell 中的中括号用法
shell中的中括号(也叫方括号) "[ ]"的用法:1、单中括号 []①bash 的内部命令,[和test是等同的。如果我们不用绝对路径指明,通常我们用的都是bash自带的命令。if/test结构中的左中括号是调用test的命令标识,右中括号是关闭条件判断的。这个命令把它的参数作为比较表达式或者作为文件测试,并且根据比较的结果来返回一个退出状态码。if/test结构中并不是必须右中括号,转载 2016-07-20 16:47:13 · 457 阅读 · 0 评论 -
Linux shell--字符串处理
工作中遇到了变量的声明方式 var=${var:-NULL}, 后来上网查询才知道其实对应了这种字串处理模式{var:-DEFAULT} 如果var没有被声明, 或者其值为空, 那么就以$DEFAULT作为其值 *也就是说,显示地给var初始化NULL当然,字符串处理有更为多样化的方式。具体可以参考http://wenku.baidu.com/view/f661763987c2原创 2016-08-04 14:25:08 · 192 阅读 · 0 评论 -
Linux shell---Cat and EOF
1. 转自:http://www.cnblogs.com/hoji-real/articles/2311101.html[shell] 使用Cat和EOF避免使用多行echo在Linux中,我们不免要频繁的修改文件,下载修改后再上传,很难提高效率。使用cat命令就可以在脚本里进行多行修改了。当然cat的使用方法还有很多,这里只是其中的一种使用方法。cat >> /ro转载 2016-08-01 16:59:31 · 591 阅读 · 0 评论 -
Linux shell ---ksh bash 区别
转自 http://www.cnblogs.com/zmlctt/p/3721022.html一、实践证明,在AIX上用的是ksh,linux上是bashsh或bsh,全名是bourne shell。它最早出现,是标准shell。后两者都兼容它。ksh和bash后续加入了历史记录,交互特性,数组,等新功能。ksh在unix上使用较多。比如hpux,AIXbash在l转载 2016-08-03 11:05:31 · 3723 阅读 · 0 评论 -
Linux shell encyclopedia, very useful
here is one very helpful shell tutorial link:http://www.tutorialspoint.com/unix_commands/index.htm原创 2016-07-21 16:25:50 · 199 阅读 · 0 评论 -
linux shell数据重定向(输入重定向与输出重定向)详细分析
在了解重定向之前,我们先来看看linux 的文件描述符。linux文件描述符:可以理解为linux跟踪打开文件,而分配的一个数字,这个数字有点类似c语言操作文件时候的句柄,通过句柄就可以实现文件的读写操作。 用户可以自定义文件描述符范围是:3-num,这个最大数字,跟用户的:ulimit –n 定义数字有关系,不能超过最大值。 linux启动后,会默认打开3个文件描述符,分别是:标准输转载 2016-07-27 09:44:20 · 649 阅读 · 0 评论 -
shell---修改linux的默认登陆是shell
ypchsh $usernamePlease enter password:Changing login shell for dinghonw on $server.To accept the default, simply press return. To use thesystem's default shell, type the word "none"原创 2016-09-02 17:40:04 · 1428 阅读 · 0 评论 -
Linux----volume group
http://www.liusuping.com/ubuntu-linux/redhat-linux-lvm.htmlLVM基本概念前面谈到,LVM是在磁盘分区和文件系统之间添加的一个逻辑层,来为文件系统屏蔽下层磁盘分区布局,提供一个抽象的盘卷,在盘卷上建立文件系统。首先我们讨论以下几个LVM术语:物理存储介质(The physical media):这里指系统转载 2016-10-13 14:52:20 · 9883 阅读 · 0 评论 -
Linux---mount
Linux mount-man page description: All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over sev- eral原创 2016-10-24 16:53:34 · 209 阅读 · 0 评论 -
Linux-shell exit code
source comes from:http://tldp.org/LDP/abs/html/exitcodes.htmlTable E-1. Reserved Exit CodesExit Code NumberMeaningExampleComments1Catchall for general errorslet "转载 2016-10-14 09:28:37 · 2492 阅读 · 0 评论 -
http---web knowledge字典
组装一个字典,来学习web相关的开发知识1. rest API 不可缺少的知识:https://curl.haxx.se/docs/httpscripting.html#User_name_and_password从http的消息类型,消息组装等给出了很详细的介绍,非常受益。不知道是否有中文版的,可以考虑翻译成中文2. 找到一个中文的http介绍的网站https://devel...原创 2019-09-06 16:22:37 · 185 阅读 · 0 评论