Discover linux log all commands to syslog, include the articles, news, trends, analysis and practical advice about linux log all commands to syslog on alibabacloud.com
Working on CentOS in daily work, there will always be some common commands that can't be remembered, a special opening, records of those commands, learning and time learning.RPM Action Class command:To view the RPM installation path:1.rpm-qa|grep Memcached2.RPM-QL memcached-1.4.13_02-6.x86_64 Yum Displays the available MySQL files from the sourceYum List | grep MySQLDelete rpm:rpm-e--nodeps PackageNameServe
in a file, separated by a domain delimiter, is called a domain. In general, the default field delimiter is a space without naming the-F domain delimiter. The 2.shell script inserts all of the awk commands into a file and makes the awk program executable, and then the awk command interpreter is invoked as the first line of the script, again by typing the script name. Equivalent to the first line of the shel
Execute shell commands in the program to automatically obtain all online IP addresses and open ports in the LAN (Linux)Preface
The question is a bit long. It is actually the following: first, let the Shell command be executed in the program, and then pass the execution result to the variable, so that subsequent transactions can be processed, the second is to use
Problem Description: Due to my misoperation, the Red Hat Linux environment variables have changed, if the general environment variables have changed can be found on the Internet many solutions, but the hero is on the Linux system to cover the environment variables, such as650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8E/0A/wKiom1iz4cCCGs-mAAAhWYGXEpM676.png-wh_500x0-wm_ 3-wmp_4-s_755218499.png
Linux Displays all updatable software inventory commands[emailprotected]:~$ yum check-update program "Yum" has not been installed.) You can use the following command to install: sudo apt-get install yum[emailprotected]:~$ sudo apt-get install Yum[sudo] password for youhaidong: Reading Take a list of packages ... Completing the dependency tree that is analyzing th
View all configuration commands for Linux systems1. Check the serial number of the motherboard:Dmidecode | Grep-i ' Serial number '2. View CPU Information:Cat/proc/cpuinfoDMESG | Grep-i ' CPU 'DMIDECODE-T processor3. View memory Information:Cat/proc/meminfoFree-mVmstat5. Check the network card information:DMESG | Grep-i ' ETH 'cat/etc/sysconfig/hwconf | Grep-i '
/home/wwwroot/logs This is the log storage path when you add these to the configuration file, restart Apache650) this.width=650; "style=" float:right;width:700px;height:101px; "src=" http://s3.51cto.com/wyfs02/M00/58/6B/ Wkiol1svjcmchvlyaaemm5ip0ka945.jpg "title="}lwkuxsr~{$VY ' 7%oq@qi{g.png "border=" 0 "height=" 101 "hspace=" 0 "vspace=" 0 "width=" alt= "Wkiol1svjcmchvlyaaemm5ip0ka945.jpg"/>Linux Apache c
1. Enter the log storage folder
Cd d:/111
2. view all documents under this file
Ls
3. Merge logs or other files
Cat *. Log> example. log # merge log files suffixed with log
Cat 1.log 2.
, after specifying this parameter the I parameter will no longer work. -R instructs the MV to move all directories and subdirectories listed in the parameter recursively.
A second parameter
When the second parameter type is a file, the MV command completes the file rename, which renames the given source file or directory to the specified destination file name.
When the second parameter is a directory name that already exists, the sou
1, Tailf Mywork.log | grep--line-buffered finduserlist Real-time tracking log, here is the Finduserlist this method is run, it will print out its logs, used to track the specific log run. --line-buffered is a line of buffers that can be used for real-time monitoring of logs as long as the buffer of the line is full and prints out.2, Tailf-n Mywork.log print the last 500 lines of
activate IP routingHostname show hostname of systemHost www.example.com lookup hostname to resolve name to IP address and viceversa (1)nslookup www.example.com lookup hostname To resolve name to IP address and viceversa (2)IP link Show Show link status of all interfacesMii-tool eth0 Show link status of ' eth0 'Ethtool eth0 Show statistics of the network card ' eth0 'Netstat-tup Show all active network conn
Groups viewing the members of the currently logged on user groupGroups Gliethttp View the group that the Gliethttp user is in, and the members in the groupWHOAMI View the currently logged in user nameInformation about groups within the system is placed in the/etc/group file, and the user's information is placed in the/etc/passwd file. Now I want to see all the users in a group named "Plants". First, you know the ID of the group, the GID. Use the comma
CatTail-fLog file description/var/log/message system startup information and error log, which is one of the most commonly used logs in red Hat Linux/var/log/secure Security-related log information/var/log/maillog message-related
People who have used the Linux system know that the Linux system view user is not the same as Windows, the right mouse button to see my Computer properties, and then look at the computer users and groups. So what do you do when looking at all the users in the Linux operating system? With the command. In fact, it is eas
Tags: ICA view CPU--top CPU release ASE BSP 4.01. View Cpu:top2. View current Linux version: Name-aTo view the currently running kernel version: Cat/pro/versionView release information: Cat/etc/issueView all information above: lsb_release-a3. View the system disk under Linux: df-lLinux common Commands (iii) View inform
Tags: body nohup paging string Lin attr log-o span1. View the Live log:Tail- F nohup.out2. Paging to view all logs:Cat Nohup. Out |4. Paging through the top N rows of logs:Tail-n nohup. Out | More5. View real-time logs and retrieve keywords:Tail- F nohup.out | grep "keyword" 6. Retrieve the log and display the pre-and post-n-Row Records of the log:Cat Nohup. Ou
file from the 512-byte block position represented by the number variable.-c number reads the specified file starting at the byte position represented by the number variable.-F If the input file is a regular file or if the filename parameter specifies a FIFO (first in, out),Then the tail command will not terminate after the last specified unit of the input file has been copied, but continueRead and copy additional units from the input file (when these units are available). If you do not specify
test.log |grep "terrain" gets the line number of the critical logCat-n Test.log |tail-n +92|head-n 20Tail-n +92 indicates a log after querying 92 rowsHead-n 20 indicates that the first 20 records are checked in the previous query results.Scenario 2: So what do we do by date? Usually we really need to find the logs at the specified time end.Sed-n '/2014-12-17 16:17:20/,/2014-12-17 16:17:36/p ' Test.logSpecial Note: The above two date must be the
restartOpen: Service iptables startClose: Service iptables stopFirewall configuration file# Cd/etc/sysconfig/iptables# vim Iptables-A input-m state--state established,related-j ACCEPT-A input-p icmp-j ACCEPT-A input-i lo-j ACCEPT-A input-m state--state new-m tcp-p TCP--dport 22-j ACCEPT-A input-j REJECT--reject-with icmp-host-prohibited-A forward-j REJECT--reject-with icmp-host-prohibitedThis segment 22 is an open port number that can be copied and pasted to add the port number to be released-A
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.