摘要: Shell判断 按照文件类型进行判断 b 判断文件是否存在,并且是否为快设备文件(是块设备文件为真) c 判断文件是否存在,并且是否为字符设备文件(是字符设备文件为真) d 判断文件是否存在,并且是否为目录文件(是目录为真) e 判断文件是否存在,存在为真 f 判断文件是否存在,并且是否为普通文件( 阅读全文
posted @ 2017-06-16 14:11 于欢水 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: 利用extundelete工具恢复磁盘误删除的数据 原理: 简单介绍下关于inode的知识。在Linux下可以通过“ls id”命令来查看某个文件或者目录的inode值,例如查看根目录的inode值,可以输入: [root@Virtual Server 100 shell] ls id / 2 / 阅读全文
posted @ 2017-06-16 14:10 于欢水 阅读(16015) 评论(0) 推荐(0) 编辑
摘要: #python3 #!/usr/bin/env python #coding:utf-8 import random import string random_str = list(string.ascii_letters + string.digits + '!@#$%^&*') print (' 阅读全文
posted @ 2017-06-16 13:57 于欢水 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Cenos6.5升级Python2.6到2.7 1.下载源码包 wget https://www.python.org/ftp/python/2.7.12/Python 2.7.12.tgz 2.进行解压,准备编译安装 tar zxvf Python 2.7.12.tgz cd Python 2.7 阅读全文
posted @ 2017-06-16 09:24 于欢水 阅读(1171) 评论(0) 推荐(0) 编辑
摘要: 1. 准备 yum install mod_ssl openssl 2. 生成一个自签名证书 cd /etc/pki/CA 1.生成2048位的加密私钥 openssl genrsa out server.key 2048 2.生成证书签名请求 openssl req new key server. 阅读全文
posted @ 2017-06-16 09:23 于欢水 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 一、LAMP环境部署 1、安装php 1.安装yum源 rpm Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel release 6 8.noarch.rpm rpm Uvh http://rpms.famillecollet. 阅读全文
posted @ 2017-06-16 09:21 于欢水 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 一、ELK搭建篇 烦请转载时注明出处,支持原创 不想注明出处烦请绕路,谢谢!!! 官网地址:https://www.elastic.co/cn/ 官网权威指南:https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html 阅读全文
posted @ 2017-06-15 17:07 于欢水 阅读(101983) 评论(16) 推荐(41) 编辑