Centos if judgment command

Linux if command No matter what programming language, conditional judgment is indispensable. SHELL is no exception.If listThenDo somethingHereElif listThenDo another thingHere ElseDo something else hereFi #! /Bin/sh SYSTEM = 'uname-S' # obtain the

Commands for creating, deleting, moving, and copying centos files

Create directory mkdir file name mkdir/var/www/testThe cp command is used to copy files from one location to another. If the destination file exists, the file will be overwritten; If the destination directory exists, the file will be copied to this

Centos vi usage

Vi editor usageThe vi editor is a standard editor for all Unix and Linux systems. It is not inferior to any of the latest text editors. Here we just briefly describe its usage andA small part of commands. The vi editor is identical for any version

Switch centos text mode to graphic interface

Enter the centos graphical interfaceTo directly access the Console interface when Linux is started, you can use vi to edit the/etc/inittab file. Find the line id: 3: initdefault: and change it to id: 5: initdefault: And then restart the system. We

CentOS deregister an online user

In windows, you can log out of an online user through the task manager.There is also a similar method in linux, that is, using the pkill command, the steps are as follows:1. Use the w command to view the users currently logged on to the system:[Root

Nginx optimization and Reinforcement

Some useful things have been merged in the East and West, which can be pasted in the nginx configuration file, Complicated functions, anti-leech protection, anti-injection protection, etc. location = /robots.txt { access_log off; log_not_found off; }

Usage of find and exec in CentOS

Find is a commonly used Linux Command, but we generally look for it not only, but also further operations. At this time, the role of exec becomes apparent.Example:Find./-name "*. txt"-exec ls-l "{}"\;Find the TXT file of the current directory and

O & M talk about how to partition linux systems in production scenarios?

# How to partition a linux system in a production scenario?# Date: 2011-07-31# Author: Old Boy# QQ: 31333741 MAIL: oldboy521@hotmail.com# QQ group: 45039636# Blog: http://oldboy.blog.51cto.com# Psite: http://oldboy.cc (coming soon)# Pblog:

Batch uninstall software using perl in CentOS

I downloaded wine last night. It was quite uncomfortable to use it. I planned to uninstall it. After I used yum remove wine, I found that many wine related programs were not uninstalled. The rest is made by using the following methods: 1. Run rpm-aq

Detailed explanation of which commands in CentOS

Which command Function Description: The which command is used to search for the location of a system command in the PATH specified by the PATH variable and return the first search result. That is to say, you can use the which command to check

Detailed explanation of ln commands in CentOS

Ln Name: ln-make links between files Function Description: there is a so-called link in the linxu system. There are two types of links: ==========================================================

CentOS firewall iptables tutorials

Iptables is an extremely flexible firewall tool designed for Linux operating systems. Iptables is useful for Linux geeks and system administrators. This article will show you how to configure the most common Linux firewall.About iptables Iptables is

Display, create, copy, move, and delete CentOS commands

First display: related commands ls, pwd Ls commands are very powerful and commonly used, but they are hard to remember. 1-1. For non-Internal commands (such as ls, rm, and mkdir), you cannot use help to view help. 1-2, ll = ls-l // display in long

Inittab Analysis in CentOS

After Linux completes Kernel boot, the/etc/inittab configuration file will be called by the init initialization process(Ps-aux | less, init process number is always 1, is the starting point of all system processes, init process also has a parent

How to change the user name in CentOS

1. Modify the user name, user group, and home directory in the/etc/passwd file;2. Modify the username and user group in the/etc/group file, and rewrite/etc/gshadow;3. Modify the username in the/etc/shadow file. If this parameter is not changed, you

View the process running time in CentOS

You can view it through ps, and through parameter-o. Example: ps-eo pid, tty, user, comm, lstart, etime | grep init Parameter description: Pid: process ID Tty: Terminal User: user Comm: process name Lstart: Start Time Etime: running time

Common CentOS network settings

Shutdown: shutdown-h now Restart: reboot Network Settings: vi/etc/sysconfig/network-sripts/ifcfg-eth0 # Set network connection type, IP, gateway, subnet mask Vi/etc/sysconfig/network # Set the Host Name Vi/etc/resolv. conf # Set DNS Service

Number of hard links to a file in CentOS

Use ls-l to view the number of hard links of a document: [Root @ localhost tmp] # ls-liTotal 1042291_drwxr-xr-x2root root 4096 Dec 11 etc7-rw-r -- r -- 2 root 1602 Oct 30 hl_passwd Use the following statement to view the hard links of a file.

Telnet in CentOS allows root users to log on

By default, linux does not allow the root user to log on to the linux host through telnet. To allow the root user to log on, you can use one of the following three methods: 1. Modify the login file Remote Logon Restrictions in RedHat are reflected

Use of the latest common performance analysis tools in CentOS

Common performance analysis tools. 1. vmstat commandVmstat is short for Virtual Meomory Statistics (Virtual Memory Statistics). This command tool is installed by default in many linux releases, the vmstat command can be used to monitor the memory

Total Pages: 5467 1 .... 4445 4446 4447 4448 4449 .... 5467 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.