2.20 特殊权限stick_bit stick_bit介绍 系统中的/tmp/目录是拥有stick_bit权限的 [root@hf-01 ~]# ls -ld /tmp/ drwxrwxrwt. 9 3.10.0-514.el7.x86_64 67 grub 131136 grub2 76 initramfs-0-rescue-513f8b3950084e768a99df3a6cd3d9e6 _64.gz 70 System.map-3.10.0-514.el7.x86_64 77 vmlinuz-0-rescue-513f8b3950084e768a99df3a6cd3d9e6
Linux学习笔记之超详细基础linux命令 ---------------------------------接Part 8------------------------------ --修改文件权限的 mkdir [选项] 目录 主要选项: -m(mode) 访问权限 创建目录的同时设置目录的访问权限 -p(parents) 一次性创建多级目录 例子:创建名为test的目录,并在其下创建Linux Documents err file file2 fillll Music Pictures Templates [laiyu@localhost ~]$ mkdir -p test/linux /test/ [laiyu@localhost ~]$ cd test [laiyu@localhost test]$ ls file file1 linux 说明:.表示当前目录 test目录在当前目录下 Linux要求硬链接文件和被链接文件必须属于同一分区并采用相同的文件系统,符号链接文件类似windows中的快捷方式,其本身并不保存内容,只记录所有链接文件的路径。
添加 Redis Server Group 准备配置文件 [root@h102 codis]# grep -v "^#" extern/redis-2.8.21/redis.conf | grep -v "^$" > /etc/codis/redis_s.conf [root@h102 codis]# grep -v "^#" extern/redis-2.8.21/redis.conf | grep -v "^$" > /etc/codis/redis2.conf [root@h102 codis
Only supported on Linux. Note, this option may change going forward.
解决方法 : 安装 pcre.x86_64 和 pcre-devel.x86_64 软件包
stats查看状态statsSTAT pid 8917STAT uptime 1183STAT time 1442996635STAT version 1.4.24STAT libevent 1.4.13-stableSTAT pointer_size 64STAT rusage_user 0.014997STAT rusage_system 0.105983STAT curr_connections 12STAT total_connections 14STAT connection_structures
分离数据库 无法分离 main 和 temp 数据库 sqlite> .databases seq name file --- --------------- ---------------------------------------------------------- 0 main /usr/local/sqlite3.11/bin/
刷新目录过期时间 [root@docker ~]# date +%s ;curl http://127.0.0.1:2379/v2/keys/testdir -XPUT -d ttl=10 -d dir=true 1454394195 {"action":"set","node":{"key":"/testdir","dir":true,"expiration":"2016-02-02T06:23:25.962070512Z","ttl":10,"modifiedIndex":85,"createdInde
打开本地的 tcp udp 5000端口 标记类型为 syslog filter中作判断如果类型是 syslog 拆分解析信息 添加 received_at received_from 字段 使用 syslog_pri { } 来处理 定义 syslog_timestamp 的格式 输出到ES 以 rubydebug 的格式输出到终端 启动 Logstash [root@h102 etc]# /opt/logstash/bin/logstash -f logstash-syslog.conf Setti
日志信息 =INFO REPORT==== 23-Oct-2015::16:52:50 === Starting RabbitMQ 3.5.6 on Erlang R14B04 Copyright (C) 2007-2015 Pivotal Software, Inc. Licensed under the MPL. See http://www.rabbitmq.com/ =INFO REPORT==== 23-Oct-2015::16:52:50 === node : rabbi
upstream 是nginx 负载均衡的主要模块,它提供了一个简单方法来轮询后端的服务器
error: /root/unrealircd/conf/unrealircd.conf:378: set::cloak-keys: (key 2) Keys should be mixed a-zA-Z0-9, error: /root/unrealircd/conf/unrealircd.conf:379: set::cloak-keys: (key 3) Keys should be mixed a-zA-Z0-9, IRCd configuration failed to pass testing 分别为: 1.要求修改操作员角色的用户名和密码 2.cloak-keys 必须得相互不一样,并且由 a-zA-Z0-9
redo 再次执行之前命令 Tip: 历史命令的保持是在当前会话中,不论此时是否已经成功连接服务 [zk: localhost:2181(CONNECTED) 20] history 10 - ls 11 - ls / 12 - create /test test 13 - get /test 14 - ls / 15 - close 16 - ls / 17 - connect localhost:2181 18 - ls / 19 - help 20 - history [zk: localhos
启动 查看配置 [root@h102 conf]# grep -v "#" /usr/local/nginx/conf/nginx.conf | grep -v "^$" worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on;
我们还可以使用 DNS API 结合 tag 来过滤服务 [root@h104 ~]# dig @127.0.0.1 -p 8600 rails.web.service.consul ; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.1 <<>> @127.0.0.1 -p 8600 rails.web.service.consul ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
启动haproxy [root@h102 ~]# /usr/local/haproxy/sbin/haproxy -f /etc/haproxy/transparent_proxy.cfg ... ... ... ---------- [root@h102 ~]# netstat -ant | grep 1234 tcp 0 0 0.0.0.0:1234 0.0.0.0:* LISTEN [root@h1
可见 docker.service 是依赖于 docker.socket 的,但是并不必要开启
struct #include <stdio.h> int main() { struct Contacts { char name[100]; int age; char mobile[12]; }; struct Contacts person1 = {"John", 30, }; printf("name: %s, age: %d, mobile: %s\n", person1.name, person1.age, p
Go 语言中只有值传递,没有引用传递,想要指针作为参数传入函数中,只能传递地址进入函数进行修改
定义一个具有两个形式参数的函数 def sum(a,b):#a,b就是形参 result = a+b print(result) #sum()函数的调用 sum(4,5)#4,5就是真实参数 运行结果为:9 def sum(a,b): result = a+b return result#result就是程序要返回出去的值 res = sum(4,5) print(res) 运行结果为:9