basic play

[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的更多相关文章
- Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结
Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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#? ...
- 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 ...
- 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 ...
随机推荐
- linux文件夹 权限为所有用户可 读写
使用命令: sudo chmod dirname -R
- Dos.ORM(原Hxj.Data)- 目录、介绍
引言: Dos.ORM(原Hxj.Data)于2009年发布.2015年正式开源,该组件已在数百个成熟项目中应用,是目前国内用户量最大.最活跃.最完善的国产ORM.初期开发过程中参考了NBear与My ...
- SqlServer 2012 AlwaysOn
第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnblogs.com/lyhabc/p/4682028.html第三篇htt ...
- Cordova指令
安装 cordova: npm install -g cordova 创建应用程序 cordova create hello com.example.hello HelloWorld cordov ...
- numpy.meshgrid的理解以及3D曲面图绘制(梯度下降法实现过程)
相关概念: 1.x向量和y向量 import numpy as np import matplotlib.pyplot as plt x = np.array([[0,1,2,3], [0,0,0,0 ...
- MFC---导出 Excel 方法
本方法通过Excel驱动写入 请添加头文件 #include"afxdb.h" 第一步创建Excel文件 安装驱动 CString FileName = L"first. ...
- [NOIP2016]借教室
NOIP2012提高组D2T2. 这道题目非常基础,正解貌似是二分+差分数组,在这里提供一种线段树的思路. 很容易发现题目让我们每次修改一段区间,然后我们只需要看每一个区间内有没有负数就可以了.可以用 ...
- pandas分组聚合案例
美国2012年总统候选人政治献金数据分析 导入包 import numpy as np import pandas as pd from pandas import Series,DataFrame ...
- CodeChef A String Game(SG)
A String Game Problem code: ASTRGAME Submit All Submissions All submissions for this problem a ...
- JVM(2)之 JAVA堆
开发十年,就只剩下这套架构体系了! >>> 之前我们说到了栈,它在内存中是连续的空间:保存一个个的栈帧,对应一次次方法的调用:还讲到了他是保存对象的引用,那么对象存在哪里呢?我们 ...