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 ...
随机推荐
- MYSQL数据库中的查询语句
查询的方法 *简单查询:select * from 表名 (* = 所有的) *读取特定列:select 字段一,字段二 from 表名 *条件查询:select * from 表名 where (多 ...
- 《图解设计模式》读书笔记1-2 Adapter模式
目录 Adapter即适配器,可以类比为将220V的电压的电源转为5V电压的手机充电器,起转换的作用. 明确概念: Adaptee:被适配者,即220v电压的电源 Adapter:适配器,即手机充电器 ...
- (转载)如何在 Github 上发现优秀的开源项目?
转载自:传送门 之前发过一系列有关 GitHub 的文章,有同学问了,GitHub 我大概了解了,Git 也差不多会使用了,但是还是搞不清 GitHub 如何帮助我的工作,怎么提升我的工作效率? 问到 ...
- ubantu 安装软件
一.解压后bin文件夹里有setup.py 进入到setup.py的目录,执行命令: sudo python3 setup.py install 二.以.whl结尾的文件 直接运行命令: sudo p ...
- eclipse以及myeclipse的xml配置文件没有提示的问题解决
对于在使用hibernate时,需要对配置文件进行配置,我们需要引入dtd约束文件.在有网的情况下,可以直接从网上下载,编写xml配置文件的时候,可以提示:在没网的情况下,那么就提示不出来. 下面的方 ...
- Linux命令行基础操作
目录 1.打开终端命令行 2.常用快捷键 2.1 tab键 2.2 Ctrl+c组合键 2.3 Ctrl+d组合键 2.4Ctrl+Shift+c组合键和Ctrl+Shift+v组合键 2.5图形界面 ...
- 让gitlab暴露node-exporter供外部prometheus使用
花了两天部署了一套监控服务 prometheus+node-exporter+grafana,公司的gitlab服务器准备部署node-exporter的时候突然发现gitlab已经有了这些服务, 也 ...
- 耗时近一个月,终于录完了VUE.JS2.0前端视频教程!
这次课录制的比较辛苦,圣诞节时原本已经快录制完成了,偶然的一次,播放了一下,感觉不满意,好几篇推倒重来,所以今天才结束. vue.js2.0是Vue.JS的最新版本,视频教程还不多,如果你看到了,学到 ...
- Vuejs中关于computed、methods、watch,mounted的区别
1.computed是在HTML DOM加载后马上执行的,如赋值: 2.methods则必须要有一定的触发条件才能执行,如点击事件: 3.watch呢?它用于观察Vue实例上的数据变动.对应一个对象, ...
- ZOJ 1610 Count the Colors(线段树,区间覆盖,单点查询)
Count the Colors Time Limit: 2 Seconds Memory Limit: 65536 KB Painting some colored segments on ...