Linux 命令

时间:2023-03-09 02:53:27
Linux 命令

Linux 常用命令

su root  切换root用户

touch /etc/www/html/1.txt  创建文件

mkdir /usr/local/apache2   建立文件夹

rm -rf /var/log/httpd/access   删除文件夹(目录以及其下所有文件、文件夹)

rm -f /var/log/httpd/access.log   删除文件

tar  -zxvf httpd-2.2.22.tar.gz   解压

1.先进入access.log里面,命令:cd /home/wwwlogs

然后在日志中查找index111.php,相关操作日志,并且写入到123.txt 文件

命令:sed -n '/index111.php/w 123.txt' access.log