linux 命令

来源:互联网 发布:p2p对等网络监管 编辑:程序博客网 时间:2024/06/09 15:30

sort  文件(可用*)|uniq -d  查询一个或多个文件中重复内容

 

如果你想在当前目录下 查找"hello,world!"字符串,可以这样:grep -rn "hello,world!" ././ : 表示路径为当前目录.-r 是递归查找-n 是显示行号

模糊查找文件
 find / -name "*tomcat*"

scp -P (端口号默认22) root(用户名)@ip:/root/a/b(地址) . (点,当前位置) 连接拷贝


ssh root@ip -P端口


du -sh * 查看文件大小


ls |wc -l 文件个数


grep '字符' 文件名 查看文件中内容


FTP

service vsftpd status 查看状态

service vsftpd  start|stop|restart|condrestart|status

crtl+f下翻 crtl+b上翻

默认端口号为22,如果是其他端口号,例如22806,则使用命令:

   sftp -oPort=22806 kyu@192.168.0.1

gzip 文件名1,文件名2    (分别压缩成.gz不保留原文件)

gunzip 文件名1,文件名2   (解压.gz)

tar -cvf 打包后的文件名.tar  文件名1,文件名2,文件名3...      (压缩成一个.tar保留原文件)

tar -xvf 文件名  (解压tar文件)



0 0
原创粉丝点击