[root@wen ~]# w
19:01:27 up 1 day, 7:06, 3 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 - Sun06 36:30m 0.00s 0.00s -bash
root pts/0 192.168.13.1 14:00 2:39m 0.45s 0.45s -bash
root pts/1 192.168.13.1 19:01 0.00s 0.00s 0.00s w [root@wen ~]# uptime
19:01:38 up 1 day, 7:06, 3 users, load average: 0.00, 0.00, 0.00

查看负载信息

查看ip
ifconfig
ip addr ----- man ip 查看更多 查看磁盘使用情况
[root@wen ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 8.6G 2.3G 5.9G 29% /
tmpfs 491M 0 491M 0% /dev/shm
/dev/sda1 190M 36M 145M 20% /boot 查看inode使用情况
[root@wen ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda2 577088 81403 495685 15% /
tmpfs 125596 1 125595 1% /dev/shm
/dev/sda1 51200 38 51162 1% /boot 查看当前系统内存的使用情况 [root@wen ~]# free -m
total used free shared buffers cached
Mem: 981 232 748 0 69 62
-/+ buffers/cache: 100 880
Swap: 1023 0 1023

[root@wen ~]# netstat -lntpu|grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1540/sshd
tcp 0 0 :::22 :::* LISTEN 1540/sshd [root@wen ~]# ss -tunlp|grep 22
tcp LISTEN 0 128 :::22 :::* users:(("sshd",1540,4))
tcp LISTEN 0 128 *:22 *:* users:(("sshd",1540,3)) [root@wen test]# lsof -i :22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1540 root 3u IPv4 11157 0t0 TCP *:ssh (LISTEN)
sshd 1540 root 4u IPv6 11159 0t0 TCP *:ssh (LISTEN)
sshd 7296 root 3r IPv4 24132 0t0 TCP bogon:ssh->bogon:64386 (ESTABLISHED)
sshd 8060 root 3r IPv4 25604 0t0 TCP bogon:ssh->bogon:54262 (ESTABLISHED)
sshd 8167 root 3r IPv4 26440 0t0 TCP bogon:ssh->bogon:54599 (ESTABLISHED)
[root@wen test]# lsof -i tcp:22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1540 root 3u IPv4 11157 0t0 TCP *:ssh (LISTEN)
sshd 1540 root 4u IPv6 11159 0t0 TCP *:ssh (LISTEN)
sshd 7296 root 3r IPv4 24132 0t0 TCP 192.168.13.128:ssh->bogon:64386 (ESTABLISHED)
sshd 8060 root 3r IPv4 25604 0t0 TCP 192.168.13.128:ssh->bogon:54262 (ESTABLISHED)
sshd 8167 root 3r IPv4 26440 0t0 TCP 192.168.13.128:ssh->bogon:54599 (ESTABLISHED)

查看80端口

查看文本

[root@wen ~]# sed -n '1,3p' /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin [root@wen ~]# awk 'NR<4{print $0}' /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin 将/home/tong/test目录下大于100k的文件移到/tmp目录
[root@wen ~]# cd /home/tong/test
[root@wen test]# dd if=/dev/zero of=oldboy bs=1K count=111
记录了111+0 的读入
记录了111+0 的写出
113664字节(114 kB)已复制,0.000403373 秒,282 MB/秒 [root@wen test]# ls
oldboy [root@wen test]# find . -type f -size +100k|xargs -i mv {} /tmp/
[root@wen test]# ls /tmp/
ps - report a snapshot of the current processes.
[root@wen test]# ps aux|grep 8338
root 8363 0.0 0.0 103320 860 pts/1 S+ 19:52 0:00 grep --color=auto 8338 网卡配置文件,最后的网卡序号可能会变 [root@wen test]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
USERCTL=no
IPV6INIT=no
HWADDR=00:0c:29:e9:95:dd
DNS2=8.8.8.8
DNS1=192.168.59.2
PEERDNS=yes 查看DNS,网卡也可以配置DNS(最先生效),最终也会解析下面的DNS文件
[root@wen test]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.13.2
真正查看网卡
[root@wen test]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
查看二进制文件
[root@wen test]# od /bin/ls
统计/var/log/下的文件数
[root@wen test]# find /var/log -type f|wc -l
77
[root@wen test]# find /var/log -maxdepth 1 -type f|wc -l
42


basic play的更多相关文章

  1. Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结

    Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...

  2. Basic Tutorials of Redis(9) -First Edition RedisHelper

    After learning the basic opreation of Redis,we should take some time to summarize the usage. And I w ...

  3. Basic Tutorials of Redis(8) -Transaction

    Data play an important part in our project,how can we ensure correctness of the data and prevent the ...

  4. Basic Tutorials of Redis(7) -Publish and Subscribe

    This post is mainly about the publishment and subscription in Redis.I think you may subscribe some o ...

  5. Basic Tutorials of Redis(6) - List

    Redis's List is different from C#'s List,but similar with C#'s LinkedList.Sometimes I confuse with t ...

  6. Basic Tutorials of Redis(5) - Sorted Set

    The last post is mainly about the unsorted set,in this post I will show you the sorted set playing a ...

  7. Basic Tutorials of Redis(4) -Set

    This post will introduce you to some usages of Set in Redis.The Set is a unordered set,it means that ...

  8. Basic Tutorials of Redis(3) -Hash

    When you first saw the name of Hash,what do you think?HashSet,HashTable or other data structs of C#? ...

  9. Basic Tutorials of Redis(2) - String

    This post is mainly about how to use the commands to handle the Strings of Redis.And I will show you ...

  10. Basic Tutorials of Redis(1) - Install And Configure Redis

    Nowaday, Redis became more and more popular , many projects use it in the cache module and the store ...

随机推荐

  1. 测开之路七十八:shell之函数和参数

    函数 function function_name(){    statement1    Statement2    ....    statementn} function_name $var1  ...

  2. OAuth 2.0 综述

    OAuth 2.0 rfc6749 规范 OAuth 2.0 rfc6749 规范-带目录,阅读 RFC 文档的 工具 OAuth 官网 OAuth2 核心 角色 Token 类型 access to ...

  3. C# 加密解密类

    一. MD5  1 防止看到明文 数据库密码,加盐(原密码+固定字符串,然后再MD5/双MD5)  2 防篡改   3 急速秒传(第一次上传文件,保存md5摘要,第二次上传检查md5摘要)   4文件 ...

  4. 求bit中1的个数有几种做法

    原文 求bit中1的个数有几种做法: - x & (x - 1) - Hamming weight的经典求法,基于树状累加:http://en.wikipedia.org/wiki/Hammi ...

  5. PowerShell 远程执行命令

    PowerShell 远程执行命令 最近在做一些自动化的测试工作,在代码实现的过程中需要远程启动/关闭一些服务或者测试机. 我首先想到的是建立一个website,通过网站对一些服务进行操作,但是这样感 ...

  6. ExcelVBA 操作putty

    Private Sub login(ip As String, userName As String, password As String) Dim TaskID As Long '设置进程id p ...

  7. 一个简单的winform程序调用webservices

    本文原创,如需转载,请标明源地址,谢谢合作!http://blog.csdn.net/sue_1989/article/details/6597078 本文的编写IDE为VSTS2008和.NET F ...

  8. 全栈开发系列学习2——django项目搭建

    项目代码:http://yunpan.cn/cHajgT4HvgHqx (提取码:8350) 配置项目: 1. 首先确保你的机器安装了python和pip,这两种安装比较简单,这里就不说了. 2. 在 ...

  9. JS-04 JS中的函数都是按值传递的

    JS中的函数都是按值传递的 1.传递参数是基本类型 如例子:基本类型传入函数后,函数内部参数生成一个参数副本,把num变量的值赋给num参数,num参数再去参与函数中的运算,但不会影响外面num变量的 ...

  10. 关于正则表达式RegExp

    常用元字符串 元字符 说明 \d 匹配   数字 \D 匹配   非数字 \w 匹配   数字,字母,下划线 \W 匹配   任意不是字母,数字,下划线 \s 匹配   空白符 \S 匹配   任意不 ...