Example of the format of several control flow statements in Linux (if statement)

Examples of the format of several control flow statements for Linux:Example of an if statement;#!/bin/sha=10B=20if [$a = = $b]Thenecho "A is equal to B"elif [$a-gt $b]Thenecho "A is greater than B"elif [$a-lt $b]Thenecho "A is less than B"Elseecho

Linux account security Management--useradd, Groupadd, passwd, Chown, chmod tools

Groupadd- g set Group ID numberExample: Groupadd Tomcatgroupadd-g600 TomcatDelete Group with GroupdelGroupdel TomcatUseradd      -c Comment Add a comment   to the new user;     -d home_dir Specify a name for the main directory (if you do not want

4-1 Linux User Management commands detailed

1./etc/passwd format User name: Password: uid:gid: Comments: Home directory: Default Shell useradd [Options] USERNAME -u:uid to be greater than or equal to 500, -g:gid refers to the basic group, must exist beforehand, UID

Linux notes--use wget to mirror Epel source

Unit of speed since two months ago has made strides into the "Cuban era", slow and heinous AH!!! , although there is not much time to install the software, but always have to use the time, or first build a local Epel source bar.Know that there is a

Remote copy of Linux SCP server

sin

First, copy the native files to the remote server#scp/home/administrator/news.txt [Email protected]:/etc/squid/home/administrator/absolute path to local filesNews.txt The local file to be copied to the serverRoot logs on to the remote server through

View disk and directory capacity under Linux--df, du

DF: Lists the overall disk usage of the file system;Du: Evaluating the disk usage of the file system (commonly used to estimate the capacity of the catalog)DF parameter:-A: List all file systems, including system-specific/proc and other file systems-

LINUX btmp Logs (LASTB command)

Linux under/var/log/btmp file:Today, check the server, found that the/var/log/btmp log file is relatively large, search, this file is log error logging, that is, there are many people trying to log into the SSH service using a password dictionary,

Add links and delete links under Linux (the use of the LN command)

adding links using the ln commandUsage:#ln--helpUsage: ln [options] ... Target [link name]Or: ln [options] ... Goal... DirectoryOr: ln [options] ...--target-directory= directory target ...Create a link to a specified and optionally specify .If no

Linux Logging user Action logging

####################################################################################Historyuser_ip=$ (Who am I 2>/dev/null | awk ' {print $NF} ' | sed-e ' s/[()]//g ')If ["$USER _ip" = ""];thenUser_ip= ' hostname 'Fiif

Linux Install SVN client

WINODW7 client Discovery problem using centos6.5 connectionYum Install subversion# svn checkout https: // 10.0.0.78/svn/trader# svn: Method options failed on "https://10.0.0.78/svn/traderhttps://10.0.0.78)Installation Method Reference:

One Linux command per day: Tar command

Scenario: Compression and decompression commands are often used in Linux environments, so it is necessary to learn this command!Original source: http://www.cnblogs.com/peida/archive/2012/11/30/2795656.html1 IntroductionThrough SSH access to the

Linux crontab command format with detailed examples

Basic format:* * * * * commandTime-sharing Weekly commandThe 1th column represents minutes 1~59 per minute with * or */1The 2nd column represents the hour 1~23 (0 means 0 points)The 3rd column represents the date 1~31The 4th column represents the

One day a Linux base command to view the contents of a file cat, TAC

Cat View text Files1 , command formatCat[option] ... [FILE] ...2 , command functions1. Display the file contents and create a new file cat>filename2. Enter the content, after the content has been entered, use Ctrl+d to end the input3. Merge several

Differences between the Linux su and sudo commands

I. Using the SU command to temporarily switch user identities1, SU's applicable conditions and powerThe SU command is the tool to switch users, how to understand it? For example, we use ordinary user Beinan login, but to add user tasks, execute

Linux Linux program Exercise 17

Summary: Use Fputs () to write data to a file, to see the results in real time, you need to use Fflush to clear the buffer/** Title: Write a daemon that writes the current time to the file Time.log every 3 seconds, * requires that the Init_daemon

Linux Screen Command detailed

I. BACKGROUNDSystem administrators often require SSH or telent telnet to a Linux server and often run tasks that take a long time to complete, such as system backups, FTP transfers, and so on. Usually we open a remote terminal window for each of

How to install a Linux system

written in the front, I novice, just contact Linux System, the operation is recorded in the form of text. Video I look at the old section of the brother's Linux private dishes. Follow-up will write other, is considered a video and then make a

Linux graphical interface switch

Turn on the text interface, switch from the text interface to the graphical interface: Method 1: Run the command #startx, you need to configure the graphical interface information, (temporarily not ~); Method 2: Modify Id:3:initdefault in

Linux configuration jdk (Mac and Windows)

My Linux uses a virtual environment built by VMware, using the CENTOS6.5First, the preparatory work:1, to determine the system installed is successful.2, the system no other problems3. Make sure no other version of JDK is installed, two JDK will

Use Vim, vim

Use Vim, vimMode ESC \ Ctrl + c: Exit edit mode ZZ \ wq: Save and exit in command mode Edit I: Enter the editing mode. I: Go to the beginning of the line to start editing S: deletes the current character and enters the editing mode. A: edit

Total Pages: 5467 1 .... 1098 1099 1100 1101 1102 .... 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.