linux常用命令

传文件
scp access.log c00216873@10.21.241.227:/home/c00216873

解压

unzip -oq common.war -d common

tar  -zxvf   压缩文件名.tar.gz

查询

cat waf.log* | grep "subcache not hits,getForecastFromCma new data success,use new data" -m 10

 

修改时间

echo 1 > /proc/sys/xen/independent_wallclock

date -s "2015-03-11 12:25:00"

排序

目录:

 

查看版本信息:

1) [root@q1test01 ~]# cat /proc/version

   Linux version 2.6.9-22.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005

  2) [root@q1test01 ~]# uname -a

  Linux q1test01 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

  3) [root@q1test01 ~]# uname -r

  2.6.9-22.ELsmp

使用此选项时,显示目录和目录下子目录和文件占用磁盘空间的大小。

du -ham --max-depth=1

统计当前目录大小

du -sk

该目录下所有子目录大小统计并排序

du -k | sort -rn

一级目录大小

du -k --max-depth=1

二级目录大小

du -k --max-depth=2

二级目录大小并排序

du -k --max-depth=2 | sort -rn

文件:

ls -lS

 

删除所有内容
:1,.d

tcp连接状态

netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

查询错误码

perror 13

接口请求

curl -H "Content-Type: application/json" -d '{ "a":"3","b":"0"}' -XPOST url

posted @ 2015-05-28 17:27  kabibo  阅读(221)  评论(0编辑  收藏  举报