栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 其他

Linux常用命令

其他 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux常用命令

解压tar包
tar -zxvf hadoop-2.7.3.tar.gz -C /opt/module/   

-z: --gzip, --gunzip, --ungzip
-x: --exclude patterns listed in file
-v: --verbosely list files processed
-f: --use archive file or device archive

查看文件的末尾和头
tail -f /opt/module/hive/logs/hive.log        检测配置文件的末尾   -F: 发生异常后再重试
tail -n 100 /etc/logs.log      显示文件的最后100行数据

head -n 100 /etc/logs.log    显示文件的头部100行数据
剪切文件列
cut -d ',' -f 1,2 test.txt          d用来指定分割符,f用来指定剪切那几列
cut -d ',' -f 2- test.txt			剪切第2列之后的列
查看所有的java进程

jps: Java Virtual Machine Process Status

jps -l         查看所有的进程(使用全类名)
防火墙相关命令

centos7中:

firewall-cmd --state                         查看防火墙状态
systemctl stop firewalld                     关闭防火墙
systemctl disable firewalld.service          阻止系统重启导致防火墙启动
杀死进程
kill -9 3433         杀死进程号为3433的进程
过滤文件内容
cat test.txt | grep "aa"             显示文件中包含aa的内容
查找文件
find / -name passwd                  在根目录下查找文件名为passwd的文件

同步日期:2021-09-24

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/279522.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号