unzip A.zip #解压zip包
zip A.zip #压缩zip包
tar -zcvf A.tar.gz A #压缩(前者是压缩包名称,后者是所要压缩的文件)
tar -zxvf A.tar.gz #解压
2.新建移动文件夹等
mkdir work #新建work文件夹
vim main.cpp#查看编辑文件main.cpp,按i启用编辑,按esc退出编辑,:q 退出不保存,:wq 保存退出cp main.cpp code.cpp#将main.cpp的内容复制到code.cppmv main.cpp work #移动main.cpp文件到work文件夹中rm-f code.cpp#删除文件code.cpprm-rf work #删除文件夹work
3.查看进程
jps -l #查看进程
top -c #查看内存使用情况
rpm -qa|grep jdk #查看已经安装的jdk
4.权限
chmod +x ddd.sh
chmod 777 file
5.查看当前路径
pwd
tail -f xxx.log #查看当前日志
less xxx.log #查看日志
systemctl status elasticsearch.service #查看es状态
systemctl start elasticsearch.service #启动es
curl --user elastic:123456 -XGET