日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux week3

發布時間:2024/9/3 linux 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux week3 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2.如何快速的回到?上?一次所在的位置?

cd An argument of - is equivalent to $OLDPWD.? cd - ?#cd $OLDPWD cd - #快速的回到 上?一次所在的位置? cd . ?#當前目錄 復制/移動? cd .. #進入當前?目錄的上級?目錄? cd ~ ?#進入當前?目錄的家?目錄 回?老老家? cd? ??#進?當前?目錄的家?目錄 等同于cd ~

第4題?

已知apache/nginx服務的訪問?日志按天記錄在服務?本地?目錄/app/logs 下,由于磁盤空間緊張,現在要求只能保留留最近7天訪問?日志!請問如何解決? 請給出解決 辦法或配置或處理理命令。(提示:可以從apache服務配置上著手,也可以從?生成出來的日志上著手。) 模擬環境 mkdir -p /app/logs? cd /app/logs? for time in {01..15};do date -s "201806$time"; touch access_www_$(date +%F).log ;done date -s "20170520"? 1. [root@web02 logs]# find /app/logs -type f -mtime +7 |xargs ls -lrt -rw-r--r-- 1 root root 0 6月 1 00:00 /app/logs/access_www_2018-06-01.log -rw-r--r-- 1 root root 0 6月 2 00:00 /app/logs/access_www_2018-06-02.log -rw-r--r-- 1 root root 0 6月 3 00:00 /app/logs/access_www_2018-06-03.log -rw-r--r-- 1 root root 0 6月 4 00:00 /app/logs/access_www_2018-06-04.log -rw-r--r-- 1 root root 0 6月 5 00:00 /app/logs/access_www_2018-06-05.log -rw-r--r-- 1 root root 0 6月 6 00:00 /app/logs/access_www_2018-06-06.log -rw-r--r-- 1 root root 0 6月 7 00:00 /app/logs/access_www_2018-06-07.log 找出/app/logs下?面以.log結尾的并且修改時間是7天之前的?文件并刪除(ls -l)? [root@web02 logs]# find /app/logs -type f -name "*.log" -mtime +7 |xargs ls -lrt 2. [root@web02 logs]# ls -lrt $(find /app/logs -type f -name "*.log" -mtime +7) 3. [root@web02 logs]# find /app/logs -type f -name "*.log" -mtime +7 -exec ls -l {} \; 4. 通過系統軟件對?日志進?行行切割

總結

以上是生活随笔為你收集整理的linux week3的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。