LNGX
ambition_forever
闲谈莫论人非
展开
-
IP地址和子网掩码
IP和子网掩码我们都知道,IP是由四段数字组成,在此,我们先来了解一下3类常用的IP A类IP段 0.0.0.0 到127.255.255.255 B类IP段 128.0.0.0 到191.255.255.255 C类IP段 192.0.0.0 到223.255.255.255 XP默认分配的子网掩码每段只有255或0 A类的默认子网掩码 255.0.转载 2017-04-23 10:32:08 · 643 阅读 · 0 评论 -
Linux Shell ifelseif
#!/bin/sha=10b=20if [ $a == $b ]thenecho "a is equal to b"elif [ $a -gt $b ]thenecho "a is greater than b"elif [ $a -lt $b ]thenecho "a is less than b"elseecho "None of the condition me...原创 2019-03-29 11:39:44 · 654 阅读 · 0 评论 -
Linux Shell ifelse
#!/bin/sha=10b=20if [ $a == $b ]thenecho "a is equals to b"elseecho "a is not equal to b"fiif [ $a != $b ]thenecho "a is not equal to b"fi原创 2019-03-29 11:31:30 · 116 阅读 · 0 评论 -
Linux shell if
#!/bin/sha=10b=20if [ $a == $b ]thenecho "a is equals to b"fiif [ $a != $b ]thenecho "a is not equal to b"fi//应该注意的是 if [ $a != $b ] 之间时必须要有空格的原创 2019-03-29 11:29:09 · 83 阅读 · 0 评论 -
Linux Shell for
#!/bin/shfor loop in 1 2 3 4 5 6doecho "The value is: $loop"doneecho "================="for str in "This is a string"do echo $strdoneecho "================="for FILE in $HOME/.bash*do...原创 2019-03-29 14:03:18 · 100 阅读 · 0 评论 -
Linux 简单命令
rm -rf *mkdir -p /a/b //创建级联目录cp test test1/test -r //递归拷贝mv a.txt text/aa.txt //移动命名echo hello >a.phpmore a.phpecho world >>a.php 追加more a.phpcp /etc/passwd . //复制到当前路径more /etc/pas...原创 2017-09-25 11:08:28 · 169 阅读 · 0 评论 -
命令03
vi /home/xiaoju/php/etc/php-fpm.conf port[root@10b0c26eba1a php]# ./load.sh restart //重启php-fpmtelnet 127.0.0.1 22 测试端口ps -ef|grep nginxps -ef|grep php-fpmsudo pkill ../php/sbin/php-fpmps原创 2017-08-29 17:29:05 · 168 阅读 · 0 评论 -
安装 zsh Bash
//安装oh-my-zsh之前需要安装zsh shell切换bashchsh -s /bin/bash切换zshchsh -s /bin/zsh1、查看系统当前的shellecho $SHELL返回结果如下:/bin/bashPS.默认的shell一般都是bash2、查看bin下是否有zsh包cat /etc/shells返回结果如下:/bi原创 2017-08-29 14:14:40 · 2811 阅读 · 0 评论 -
命令02
1:nginx 重新启动 /home/xiaoju/nginx/sbin/nginx /home/xiaoju/nginx/sbin/nginx -s reload2:查看php-fpm进程 ps aux | grep -c php-fpm 3:重启php-fpm sudo php/sbin/./php-fpm & 4:原创 2017-08-29 14:03:35 · 174 阅读 · 0 评论 -
命令
1:在工作区是用git checkout – 文件名 撤销对文件的修改2:如果add以后,那么文件的位置就由工作区移动到暂存区,同样可以将暂存区的修改撤销掉,重新回到工作区, git reset HEAD 文件名 退回指针的起始地址 git reset commitID 退回到指定版本 git reset 可以回退版本,同样可以把暂存原创 2017-08-29 13:56:14 · 164 阅读 · 0 评论 -
Linux Shell switchcase
#!/bin/shecho "Input a number between 1 to 4:"echo "Your number is :"read aNumcase $aNum in1) echo 'You select 1';;2) echo 'You select 2';;3) echo 'You select 3';;*) echo 'You do not selec...原创 2019-03-29 11:50:23 · 640 阅读 · 0 评论