I saw the getent command on a video yesterday, which can be used to view related records in the system's database, for example:
[Email protected]:~$ getent hosts GUOLIANGC10.10.3.1 GUOLIANGC[Email protected]:~$ getent passwd
Table of Contents: 1, commonly used file folder operation2. settings for file attributes
1. common file Folder operationmkdir Create folder-p If you specify A/B/C, a and b do not exist, create them togetherCP Copy file or folder-r copy
How Linux blurs to find a fileSearch for the specified file in the current directory:Find. -name Test.txtTo search for files under the current directory:Find. -name ' *.txt 'Search for a file of a specific property in the current directory:Find.
The first is the shutdown/restart command , which is used only at the virtual machine and not in the actual workreboot is generally not used with parameters, the input command can be restarted shutdown- R -R now-F
Use the System method correctly to determine the return valueintExecmd (Const Char*cmd) {pid_t status; Status=system (CMD); if(-1==status) {Writelog ("system error!"); } Else{Writelog ("Exit Status value = [0x%x]\n", status); if(wifexited
Example:The steps to open port 10000 are as follows:1, modify the/etc/sysconfig/iptables file, add the following line:-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 10000-j ACCEPTRestart IptablesService Iptables Restart 2, restart the
CentOS configuration static IP on a piece of SSD1. Configure static IP#vi /etc/sysconfig/network-scripts/ifcfg-eth0 device="eth0" device Namenm_controlled= whetherthe "yes" device is NetworkManager managedonboot="No"
1 CD commandCommand format: CD [directory name] (CD and directory separated by spaces)The CD enters the user's home directory;CD ~ Enter the user's home directory;CD- Returns the directory where the directory was before it entered;CD.. Return to the
1, the control of the standard inputSyntax: Commands Mail-s "Mail Test" [email protected] The file file1 as the content of the letter, the subject name is mail test, sent to the recipient.2, the control of the standard outputSyntax: commands > Files
Date: Time ManagementLinux:Real Time Clock RealtimeNTP (Network time): protocolHardware clock: Our command clock command is the hardware time displayedSystem clock: Our date command is the system time displayedThe two mutually converted
Tomcat, Linux ServerThe command to useDecompression command: TAR-ZXVF file nameConfiguration:Vi/etc/profilePress I to enter insert modeAdd the code at the end of the file:Export java_home=/usr/local/server/jdk1.8.0_91Export classpath=.: $JAVA
Git project: Https://github.com/torvalds/linuxLinux LDP (Linux document Project): Help Document Project
Oprofile Tool: A powerful performance analysis tool, which is recommended here for download: hereInstallation and use of Oprofile:Installation
Xargs Command * * * *You can use the Xargs command when you need to convert the argument list to small pieces to pass to other commands. Chestnuts are as follows:If you want to kill the whole process after starting LAMPP, you can use the following
1, modify the user process can open the number of files limitOn a Linux platform, regardless of whether you write a client or a service-side program, the highest concurrency is limited by the number of files that can be opened by the system at the
When our program has frequently used modules, and this module is also used in other programs, at this time according to the idea of software reuse, we should create libraries, so that later programming can reduce the amount of development code. This
/ o:System settingsDefault input device: standard input, stdin,0Default output device: Standard output, stdout,1Standard error Output: stderr,2belong to different data streamsStandard input: KeyboardStandard output and Error output: DisplayI/O
Linux practice project-sudo log audit and linux practice sudo log
Practical Linux project -- sudo log audit
Because sudo permission management is enabled in Enterprise Internal permission management, there are still some risk factors. After all,
Set up an ftp server using centos and set up ftp using centos
1. Install vsftpd
sudo yum install vsftpd
2. Configure vsftpd. conf
# Allow anonymous FTP? (Beware-allowed by default if you comment this out ). anonymous_enable = NO # When SELinux is
Linux management and I/O redirection and linuxo redirection
I/O:
System settings
Default Input Device: standard input, STDIN, 0
Default output device: standard output, STDOUT, 1
Standard Error output: STDERR, 2
Different data streams
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