logrotate command in Linux】的更多相关文章

背景 在生产过程中,由于磁盘空间.保留周期等因素,会对系统.应用等日志提出要求,要求系统日志定期进行轮转.压缩和删除,从而减少开销,而系统自带的logrotate  则是一个简单又实用的小工具,下面着重介绍一下,满足日常需求. 语法 Usage: logrotate [OPTION...] <configfile> 常用参数 : -f 非设定周期内强制运行 -d 调试,对日志模拟进行操作 -v 可视化执行过程结果 其它参数不常用,详情见下: [root@test01 ~]# logrotate…
The mailx or mail command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail’s smtp in mailx/mail? gmail is a little special since gmail’s smtp se…
Using Android Phone to recover SD card formatted with DD command under linux 1. Formatted a sd card with dd command under linux 2.insert the sd card into an android phone,certainly the card is not find and used.. 3 reset the android phone with format…
[screen command of linux] 常用键:   补充: Ctrl-a S  # split terminal horizon Ctrl-a TAB   # switch to another splitted part then use step 3 to select a screen Ctrl-a | #split termianl vertical ctrl +a X  // 关掉当前分屏 Ctrl-a: quit  #结束并退出当前session   command命令…
The Tree Command for Linux Homepage http://mama.indstate.edu/users/ice/tree/ [root@test ~]# ll -as mpBMCwepytotal 340 4 drwxr-xr-x 6 root root 4096 Oct 19 23:45 . 4 dr-xr-x---. 14 root root 4096 Oct 20 11:05 .. 4 drwxr-xr-x 10 root root 4096 Oct 19 2…
Linux command ls basically use the file /etc/DIR_COLORS or /etc/DIR_COLORS.xterm to define the colors used, in terms of different types of terminal windows. You can change the definitions directly in these files to alter the colors to meet your expec…
The dd command stands for "data duplicator" and used for copying and converting data. It is very powerful low level utility of Linux which can do much more like; Backup and restore the entire hard disk or partition. Backup of MBR (Master Boot Re…
Yesterday I was asked to upload a file in Linux to the corresponding server. I said "oops" because I never used that in Linux shell, we used Filezilla in Windows for such purpose of task. Therefore there is a quite good tutorial on nixCraft: htt…
Switch user command (su) has the following forms: su Switch to , without loading environment variables. If is omitted (only "su"), it equals to "su root"; su - Switch to , and loading environment variables. "-" is the abbrevi…
是对文件中的每一行进行处理,不会对源文件进行修改 sed --version sed '11d' sed_file sed -n '/[Bb]erry/p' sed_file (由于设置了n,所以只打印出有Berry/berry的行) sed  '/[Bb]erry/p' sed_file(没有设置n,则会输出所有的行,同时有Berry/berry的行会输出两次) sed 's/berry/bbery/' sed_file sed '/^berry/p' sed_file (打印所有以berry…