#!/bin/bash#!/bin/bash#exact All log files#计算log文件个数log_number= ' ls *.log |grep log-c '#当log文件数大于0时遍历删除文件中的文件夹If [$log _number-gt 0];thenlist_log_files=$ (LS *.log)#Traverse to delete filesFor log_file in $list _log_filesDo#delete All log
Screen similar to a container, you can put the current foreground running Application Shell window closed without affecting the operation, and after the nohup a bit similar, but I think it is more useful than nohupUsage 1:ScreenThen it pops up a new
1.xargs combined with find useWhen you delete too many files with RM, you may get an error message:/BIN/RM Argument list too long. Use Xargs to avoid this problem:Find. -type F-name "*.log"-print0 | xargs-0 rm-fThe xargs-0 is used as a
1. * EverythingEnd With. txt *.txtEnd With. Log *.logA file in the system that begins with LS.Find/-type f-name "ls*"Locate the file in the system that contains Oldboy.Find/-type f-name "*oldboy*"2. {} Generate Sequenceecho {1..10}echo {10..1}echo {0
Linux Time Line
System V and BSD in the 80 's copyright dispute
1990 BSD transplant to X86 386 plan aborted
1991 Finnish Linus invented Linux
1994 Linux1.0 released for use in production environments
Operating systemOS =
Mainly through the following two commands:cat/etc/passwdCat/etc/groupStep One: CAT/ETC/PASSWD View all user information, details such as:Step 2:cat/etc/passwd|grep user name to find a user, details see:Step three: Cat/etc/group View all group
The first contact with Linux is a very simple small project to restart the project, but because it has not been contacted before, I recorded a simple operation.Before using the Linux server to download the installation Xshell and Xftp, after the
sudo 以另一个用户身份执行命令Syntax format: sudo "option" sudo [options]Note: There must be at least one space between each element in the sudo command and subsequent options and filesParameter options:-L, which lists the commands that the current user can
The minimization principle is extremely important for Linux system security, that is, more than a few things, including the following aspects:
Install the Linux system minimized, that is, the package is minimized, yum installation package
1. Modify the host name:Under root account, use the command: vi/etc/sysconfig/networkor sudo vi/etc/sysconfig/network2. Set the system default boot levelEnter the Vi/etc/inittab level in the root account to change to 3Each start-level representative
Zabbix Application ExamplesAdd a custom monitoring itemLet's take an example: monitor the number of concurrent connections on a Web server 80 port and set up a graph.1. Write a script that can crawl the data and create a script on the client
Crond is a command that Linux uses to execute programs on a regular basis. This task Dispatch command is started by default when the operating system is installed. The Crond command periodically checks to see if there is any work to be done and the
1.tar Unzip what problemUser User groups2. What is the search for XXX command?Find/-name XXX3. We execute the order, actually go to which variable to findPATH4. Talk about the parameters of the big R commandChown chmod5. Talk about small R
Learning content: Intermediate: System Foundation, System management, network security and network services, shell scriptingAdvanced: MySQL database, clustering, distributed systems and virtualization technologies: XEN,KVM, operation and maintenance
Dash + Alfredhttps://www.jianshu.com/p/77d2bf8df81fFor programmers, viewing the API documentation is very frequent, and switching between the regular Windows is cumbersome, and there is a document-checking artifact on the Mac: Dash.Detailed use can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service