Linux 命令总结 tar、tree、tcpdump、


NMS:
user:root
password:rss123; public

 

 

bash-3.00$ su - wacos
bash-3.00$ nohup ./agtmslr.sh &
bash-3.00$ tail -f  nohup.out
bash-3.00$ rm -rf nohup.out
bash-3.00$ ps -ef | grep mslr
bash-3.00$ df -k
bash-3.00$ zcat MSLR_MES_2.7.0_MSLR_0001.11_SOLARIS_s8_SSW_API _0926.2_9i.tar.Z|tar xvf –

mount -F nfs 10.56.71.100:/opt/wacos/oss/home/picture/ /opt/wacos/server/iptv3a/wau/picture
share -F nfs -o rw /opt/wacos/oss/home/picture/
cat /proc/version
cat /proc/version
chmod [who] [opt] [mode] 文件/目录名


查看cmmaster 进程;
[root@Mother_FLASH ~]# ps -ef|grep cmm
root     32519     1  0 Nov03 ?        00:02:26 ./cmmaster -fxxx -s -d
root      2591  2541  0 19:59 pts/2    00:00:00 grep cmm
[root@Mother_FLASH ~]#
查看md进程
[root@Mother_FLASH ~]# ps -ef|grep med
root     26681     1  0 Oct26 ?        01:22:33 media_director -s
root      8449  8369  0 19:57 pts/2    00:00:00 grep med
[root@Mother_FLASH ~]#
查看log
[root@Mother_FLASH ~]# cd /var/log/
[root@Mother_FLASH log]# tail -f media_director.log

查看ls上的监听端口
[root@Mother_FLASH ~]#
[root@Mother_FLASH ~]# netstat -an |grep 8890
tcp        0      0 0.0.0.0:8890                0.0.0.0:*                   LISTEN     
[root@Mother_FLASH ~]#

网卡的混杂模式如何设置和取消?
以你贴的看你的eth0没有开启promiscuous mode呀
想开吗?
ifconfig eth0 promisc
想关吗?
ifconfig eth0 -promisc

网卡的混杂模式如何设置和取消?
以你贴的看你的eth0没有开启promiscuous mode呀
[root@Mother_FLASH ~]#
[root@Mother_FLASH ~]# ifconfig  eth1 promisc  //open
[root@Mother_FLASH ~]#
[root@Mother_FLASH ~]# ifconfig eth1 -promisc  //close
[root@Mother_FLASH ~]#

----------------------------------------------tree--------------------------------------
linux 目录结构
[root@Mother_FLASH tmp]#
[root@Mother_FLASH tmp]# tree -l
.
|-- H.264_2M_128K_
|-- H.264_HD_8M_
|-- logwatch.YTiYc89F
`-- ssh-cDbnD30924
    `-- agent.30924

2 directories, 3 files
[root@Mother_FLASH tmp]# cd ssh-cDbnD30924/
 
[root@Mother_FLASH tmp]# tree -ACd  /usr/local/rss/
/usr/local/rss/
+-- DB
+-- backup
+-- bin
+-- cfg
+-- cmd2cfg
+-- data
+-- lib
+-- lnms
|   +-- 69
|       +-- 2.7.2.8
|           +-- 006
|               +-- 2
+-- tmp

13 directories
[root@Mother_FLASH tmp]#
[root@Mother_FLASH tmp]#
[root@Mother_FLASH tmp]# tree -ACdx  /
[root@Mother_FLASH tmp]#
[root@Mother_FLASH tmp]# tree -AL 1 /
[root@Mother_FLASH tmp]#

 

 

----------------------------------------------tar--------------------------------------
安装.tar.gz、tar.bz2、tgz、tbz2格式的软件包
先解压缩,解包
tar –zxvf x.x.x.tar.gz
tar –jxvf x.x.x.tar.bz2


安装与卸载软件
安装:rpm –ivh
升级:rpm –Uvh
卸载:rpm –e

tar
压缩:
[root@Mother_FLASH test1]#
[root@Mother_FLASH test1]# tar -cvf ./ddtest/all.tar a01.txt a02
a01.txt
a02
[root@Mother_FLASH test1]# ll ./ddtest
total 12
-rw-r--r--  1 root root 10240 Oct 21 20:54 all.tar
[root@Mother_FLASH test1]# gzip ./ddtest/all.tar
[root@Mother_FLASH test1]#
[root@Mother_FLASH test1]# ll ./ddtest
total 4
-rw-r--r--  1 root root 163 Oct 21 20:54 all.tar.gz
[root@Mother_FLASH test1]#
解压:
[root@Mother_FLASH test1]# cd ddtest
[root@Mother_FLASH ddtest]# gzip -dc all.tar.gz
[root@Mother_FLASH ddtest]# ls
all.tar.gz
[root@Mother_FLASH ddtest]# tar -xvf all.tar.gz
a01.txt
a02
[root@Mother_FLASH ddtest]# ls
使用管道:
[root@Mother_FLASH ddtest]# gzip -dc all.tar.gz|tar  -xv
a01.txt
a02
[root@Mother_FLASH ddtest]#
[root@Mother_FLASH ddtest]# ls
a01.txt  a02  all.tar.gz
[root@Mother_FLASH ddtest]#

 

----------------------------------------------gz解压缩--------------------------------------
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# ll
总计 40
drwxr-xr-x 2 root root 4096 12-13 11:22 test
drwxr-xr-x 2 root root 4096 12-13 11:51 test1
drwxr-xr-x 3 root root 4096 12-13 11:45 test2
drwxr-xr-x 2 root root 4096 12-13 11:21 test3
drwxr-xr-x 2 root root 4096 12-13 11:24 test4
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -zcvf test1/all.tar.gz  test/
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -tvf test1/all.tar.gz
drwxr-xr-x root/root         0 2010-12-13 11:22:13 test/
lrwxrwxrwx root/root         0 2010-12-11 21:35:49 test/y.c -> test1.c
-rw-r--r-- root/root        12 2010-12-11 22:41:23 test/test1.c
-rw-r--r-- root/root         8 2010-12-13 10:54:33 test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -zxvf test1/all.tar.gz -C test2/
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# ll  test2/
总计 8
drwxr-xr-x 2 root root 4096 12-13 11:22 test
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# ll  test2/test/
总计 20
-rw-r--r-- 1 root root 12 12-11 22:41 test1.c
-rw-r--r-- 1 root root  8 12-13 10:54 test2.txt
lrwxrwxrwx 1 root root  7 12-13 11:59 y.c -> test1.c
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# gzip -dc test1/all.tar.gz |tar  xvf -
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]# gzip -dc test1/all.tar.gz |tar  -xv
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#


----------------------------------------------bz2 解压缩--------------------------------------
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -jcvf test3/all.tar.bz2   test/
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -tvf test3/all.tar.bz2  
drwxr-xr-x root/root         0 2010-12-13 11:22:13 test/
lrwxrwxrwx root/root         0 2010-12-11 21:35:49 test/y.c -> test1.c
-rw-r--r-- root/root        12 2010-12-11 22:41:23 test/test1.c
-rw-r--r-- root/root         8 2010-12-13 10:54:33 test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# tar -jxvf test3/all.tar.bz2  -C test4/
test/
test/y.c
test/test1.c
test/test2.txt
[root@s151 mytest]#
[root@s151 mytest]#
[root@s151 mytest]# ll test4/test/
总计20
-rw-r--r-- 1 root root 12 12-11 22:41 test1.c
-rw-r--r-- 1 root root  8 12-13 10:54 test2.txt
lrwxrwxrwx 1 root root  7 12-13 12:08 y.c -> test1.c
[root@s151 mytest]#
[root@s151 mytest]#
----------------------------------------------tcp dump--------------------------------------
[root@Mother_FLASH log]# tcpdump -i eth1 host 10.48.12.11 -w vic
[root@Mother_FLASH log]# tcpdump -r vic -x
[root@Mother_FLASH log]# tcpdump -r vic -x -c1

[root@Mother_FLASH log]# tcpdump -i eth1 host 10.48.12.11 -w packet
[root@Mother_FLASH log]# tcpdump -r packet -x -c2
[root@Mother_FLASH log]# tcpdump -r packet -x

----------------------------------------------tcp dump--------------------------------------

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值