linux常用命令

1.rz 上传文件
2.touch ftptest.txt创建txt文件命令

3.创建多层目录

mkdir -p mulu1/mulu2/mulu3 //同时创建三个目录

4.修改文件名的命令
例如: mv ftptest.txt ftptest111.txt


5.加权限
hadoop fs -chown lyb:lyb /test/lyb


6.看查哪些进程占用的2181的端口
netstat -an |grep 2181

netstat -pan | grep 5088

ps -ef | grep 101768


7.查看目录下文件的大小

du -h


8.用grep命令在kafka-source.conf文件中搜索hdfs 字符串
grep hdfs kafka-source.conf

9.在less分页查看hdfs中的文件内容
hadoop fs -cat /daas/bstl/term/rawdt/20150805_9 | less


10.怎么样给linux文件添加可执行权限?


chmod 777 test.sh

11.查看日志
tail -f /logs/cataline.out


12.windows命令行查看本机ip命令
ipconfig


13.查看本机是否可以访问公网ip的命令

14.tracepath命令

tracepath命令用来追踪并显示报文到达目的主机所经过的路由信息

15.爬虫启动爬区命令

nohup bin/crawl /urls/seed_weibo.txt test_02 http://10.0.172.207:8983/solr/collection1 2 &

16.替换apache-nutch-2.3.job 中的 httpclient-login.xml 文件


jar uf apache-nutch-2.3.job httpclient-login.xml


17.solr启动 ,进入example/

nohup java -jar start.jar &

http://10.0.172.207:8983/solr

http://10.0.172.207:8088

start-all.sh

start-hbase.sh

jps

44458 Jps

121474 DataNode
122027 NodeManager
121903 ResourceManager
121684 SecondaryNameNode
121325 NameNode

6254 HRegionServer
6071 HMaster


启动nutch rest服务
bin/nutch nutchserver


删除solr指定collection的所有记录

curl http://10.0.172.207:8983/solr/collection1/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

nutch rest 远程调用nutch

nohup java -jar nutchrest-0.0.1-SNAPSHOT.jar 10.0.172.207 -port 18081 -seedDir /urls/seed_test.txt -crawlId test_rest_02 -solr.server.url http://10.0.172.207:8983/solr/collection1 -deepth 2 &

18.vi编辑模式下显示文件的行号

显示所有行号,在VI的命令模式下输入:set nu

原文地址:https://www.cnblogs.com/liyanbin/p/5001104.html