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
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
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
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
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
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 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,
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
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
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
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
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
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
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
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
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
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, 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
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