Popular Articles

Recent Stories

Apache配置cookie的HttpOnly属性

There is no translation available.

# vi /etc/apache2/sites-available/example.com.conf
Header set Set-Cookie HttpOnly;Secure

Apache X-Frame-Options配置

There is no translation available.

X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在 <frame>, <iframe> 或者 <object>中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌到别人的网站中去,也从而避免了点击劫持 (clickjacking) 的攻击。

Hive常见操作命令

There is no translation available.

1. hive模糊搜索表 show tables like '*name*';

2. 查看表结构信息 desc formatted tablename; desc table_name;

3. 查看分区信息 show partitions tablename;

4. 根据分区查询数据 select table_coulm from tablename where partitionname = '2016-02-25';

Ubuntu 常用查找文件与文件内容指令

There is no translation available.

查找文件

locate

作用相当于find -name,但是locate速度会比find快很多,因为locate命令也是用数据库查找的。