It is common to have the following actions for simple manipulation of strings:echo ${#var} print variable var lengthecho "$var: 3:8" Print variable var 4th character starting with 8 charactersecho ${var/word1/word2} change word1 to Word2echo ${var: (
Create Network namespace
# IP netns Add Blue
# IP Netns List
Blue
Add a network port to namespaceCreate Veth First
# IP link Add veth0 type Veth peer name Veth1
In the current namespace you can see Veth0 and veth1
Grep is also a tool found in Linux, operations, programmers must master theThe following parameters are described for grep:--colorKey marker matches to itemgrep "A word" datafile--color=auto-EGREP uses regular expressions, or it can be used directly
To install a virtual Environment command:sudo pip install virtualenvsudo pip install VirtualenvwrapperAfter installing the virtual environment, if you are prompted to not find the mkvirtualenv command, you must configure the environment variable:# 1,
Linux User ManagementLinux systems, like Windows systems, can create different users, different groups of users. Using the system under different users has the appropriate permissions
When creating a normal user, several files are modified
The LS command is the most commonly used command of Linux, and the LS command is the abbreviation for list, the main function is: Print out the current directory of the list. If LS specifies a different directory, then the list under the specified
pwd View the current directory/root slash equivalent to root directoryCD Change directory switch catalog CD/--means switch to the root directoryls View the files in the current directoryls-l listing the current directory detail file informationls-a
1. Environment constructionVmware+fedora2. Create a Hello filemkdir Hello3. Create hello.c and Makefile two text files in Hello(1): Create hello.cVim hello.cHELLO.C:#include #include Module_license ("Dual BSD/GPL"); static int hello_init (void)
First, Environment constructionVmware+fedora;Three compressed packages: Link: https://pan.baidu.com/s/1YR7jXKLhRmEhDVQiOMkKyg Password: 0ah0Ii. Establishment of documents1. Create a file in the root directory cjjmkdir CJJ2. Put three compressed
The construction of the Linux lamp environment1. Install the Lamp Environment installation toolOur lamp environment is compiled and installed using source packages:Compiling the installation requires the tool GCC gcc-c++.Recommended Online
One: Installation FTP1. Check if FTP is installed: (is the installed effect, no installation not shown)Rpm-qa|grep vsftpd2, Installation instructions: (Find a-y command)Yum Install-y vsftpd3. After the installation is complete, follow step 1 to see
Click Back to learn the path of the Linux command line and shell script11.3-Using variablesThe execution of a shell script can typically take several ways:1):bash script-name or sh script-name(recommended)2): Path/script-name or./script-name
fdisk 磁盘分区功能Syntax format: fdisk "option" "Device" fdisk [options] [device name]Note: There must be at least one space between each element in the FDISK command and subsequent options and device namesOption Description:
parameter
Experimental project:1 Mastering methods for managing Linux disks and Partitions 2 mastering methods for mounting and uninstalling file Systems 3 Mastering how to create and manage LVM partitionsTheoretical part:A: Introduction to disks and
We shared 30 Linux usage tips last week, but not enough! Today summed up some, on the road to learning Linux hope to help you.previous: "30 must know the Linux command skills, you have mastered it?" " 31, the Monitoring directory, the newly created
Sentence notation:Find corresponding directory-mtime + days-name "file name"-exec rm-rf {} \;Example 1: Place all 10 days before the/usr/local/backups directory with "." The file deletionFind/usr/local/backups-mtime +10-name "* *"-exec RM-RF {}
Uniq Removing duplicate rows-C Remove Duplicate rows and count the occurrences of each row-D displays only duplicate rows-U only displays unique rowsUniq can only remove successive occurrences of a repeating row, so a sort order is required to useTo
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