小强的BLOG

野生程序猿

生成的新文件夹都在source下也就是和放文章的文件夹一块
以下所有命令都是在博客文件目录下执行

1. 创建“分类”选项

生成“分类”页并添加tpye属性,进入博客目录。执行命令下方命令

$ hexo new page 

categories复制代码categories文件夹下会有index.md这个文件,打开后默认内容是这样的:

阅读全文 »

hexo常用指令

常用指令

init

1
2
hexo init
复制代码

新建一个网站。如果没有设置 folder ,Hexo 默认在目前的文件夹建立网站。

阅读全文 »

Linux crontab命令

crontab命令选项:

     -u指定一个用户
     -l列出某个用户的任务计划
     -r删除某个用户的任务
     -e编辑某个用户的任务

cron文件语法:

      分     小时    日       月       星期     命令
      0-59   0-23   1-31   1-12     0-6     command     (取值范围,0表示周日一般一行对应一个任务)
     记住几个特殊符号的含义:
         “*”代表取值范围内的数字,
         “/”代表”每”,
         “-”代表从某个数字到某个数字,
         “,”分开几个离散的数字

任务调度设置文件的写法

阅读全文 »

tomcat catalina.out日志拆分

创建脚本方式:

创建sheel脚本

#!/bin/sh
y=`date "+%Y"`
m=`date "+%m"`
d=`date "+%d"`
cd /opt/apache-tomcat-6.0.39-1/logs
cp catalina.out catalina.out.$y$m$d.log
echo > catalina.out
exit

linux系统创建定时任务触发脚本

创建定时任务命令

阅读全文 »

ORACLE简单命令笔记

EXP命令:

  1. 将数据库SampleDB完全导出,用户名system 密码manager 导出到E:/SampleDB.dmp中
    exp system/manager@TestDB file=E:/sampleDB.dmp full=y

  2. 将数据库中system用户与sys用户的表导出
    exp system/manager@TestDB file=E:/sampleDB.dmp owner=(system,sys)

  3. 将数据库中的表 TableA,TableB 导出
    exp system/manager@TestDB file=E:/sampleDB.dmp tables=(TableA,TableB)

  4. 将数据库中的表tableA中的字段filed1 值为 “王五” 的数据导出
    exp system/manager@TestDB file=E:/sampleDB.dmp tables=(tableA) query=\" where filed1='王五'\"

    exp username/password@ip:port/servername file=F:/test/test.dmp tables=(TABLE1,TABLE2) query=\"where ID='1'\"

  5. 导出分区表

    阅读全文 »

Oracle数据表分区笔记

When to Partition a Table什么时候需要分区表,官网的2个建议如下:

(1)Tables greater than 2GB should always be considered for partitioning.

(2)Tables containing historical data, in which new data is added into the newest partition. A typical example is a historical table where only the current month’s data is updatable and the other 11 months are read only.

阅读全文 »

用nexus本地搭建maven仓库

  1. 下载nexus-2.12.0-01-bundle.zip压缩包,解压安装。

  2. 在命令行窗口,进入/nexus-2.12.0-01目录,输入nexus命令,出现如下(可以将nexus加入环境变量,方便使用):

    执行 nexus install 将Nexus安装为Windows服务。可将服务启动方式设为手动:

    以后通过 nexus start 即可启动Nexus ,通过 nexus stop 退出Nexus:

  3. 在浏览器中访问http://localhost:8081/nexus/

    右上角使用用户名:admin ,密码:admin123 登录。

  4. 在本地搭建的maven仓库中添加jar包:

    mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc14.jar

Log4j笔记

一、Log4j简介

Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局)。这里可简单理解为日志类别,日志要输出的地方和日志以何种形式输出。综合使用这三个组件可以轻松地记录信息的类型和级别,并可以在运行时控制日志输出的样式和位置。

阅读全文 »
0%