1 template <class Item> 2 void shellsort(Item a[], int l, int r) 3 { int h; 4 for (h = l; h <= (r-l)/9; h = 3*h+1) ; 5 for ( ; h > 0; h /= 3) 6 for (i ...
分类:
编程语言 时间:
2019-11-10 17:13:25
阅读次数:
67
使用Mac看到Linux的Ubuntu终端显示的颜色是不是觉得很酷炫,是否很想自己也拥有一样变色技巧?不怕,我们也是可以的! 1. 打开配置文件 sudo vim ~/.bash_profile 写入以下两行: export CLICOLOR=1 export LSCOLORS=GxFxCxDxBx ...
分类:
系统相关 时间:
2019-11-10 16:05:38
阅读次数:
136
#touch /usr/local/nginx/sbin/cut_nginx_log.sh #chmod 755 /usr/local/nginx/sbin/cut_nginx_log.sh 下面是脚本具体内容 #! /bin/bash logs_path="/usr/local/nginx/log ...
分类:
其他好文 时间:
2019-11-10 15:56:17
阅读次数:
106
root身份安装 创建用户 编译安装成功后,接下来要做的就是创建一个普通用户,因为默认超级用户(root)不能启动postgresql,所以需要创建一个普通用户来启动数据库,执行以下命令创建用户: [root@localhost build_dir]# groupadd postgres [root ...
分类:
数据库 时间:
2019-11-10 15:54:44
阅读次数:
265
Shell 脚本 Shell 脚本(shell script),是一种为 shell 编写的脚本程序。 业界所说的 shell 通常都是指 shell 脚本,但读者朋友要知道,shell 和 shell script 是两个不同的概念。 由于习惯的原因,简洁起见,本文出现的 "shell编程" 都是 ...
分类:
系统相关 时间:
2019-11-10 15:48:31
阅读次数:
75
要求 利用fork,exec,wait编写一个具有执行命令功能的shell ...
分类:
系统相关 时间:
2019-11-10 15:24:57
阅读次数:
67
问题一:git warning: LF will be replaced by CRLF in 解决办法 在Git Bash中输入git add .时出现上述语句。 解决办法: 输入以下语句: 1 $ git config core.autocrlf false ,这样设置git的配置后在执行add ...
分类:
Web程序 时间:
2019-11-10 15:24:16
阅读次数:
90
shell编程入门简介 shell是用户与linux操作系统之间沟通的桥梁,用户可以输入命令执行,又可以利用shell脚本去运行 shell种类非常多,常见的shell如下: bourne shell(/usr/bin/sh或/bin/bash) bourne again shell(/bin/ba ...
分类:
系统相关 时间:
2019-11-10 14:03:39
阅读次数:
98
ctrl + l 清屏,相当于clear命令 ctrl + o 执行当前命令,并重新显示本命令 ctrl + s 阻止屏幕输出,锁定 ctrl + q 允许屏幕输出 ctrl + c 终止命令 ctrl + z 挂起命令 ctrl + a ctrl + e ctrl + f ctrl + b alt ...
分类:
其他好文 时间:
2019-11-10 13:35:06
阅读次数:
85
应该是没有修改环境变量 使用命令 vi /etc/profile 在文件中添加环境变量 退出后,使用命令 source /etc/profile 重启环境变量 再使用命令 mysqld --initialize --user=mysql --basedir=/usr/local/mysql --da ...
分类:
数据库 时间:
2019-11-10 11:45:44
阅读次数:
743