Enterprise Face question 1:Use the For loop to create a batch of 10 files in the/oldboy directory, with the name in turn:Oldboy-1Oldboy-2Oldboy-3......Oldboy-10Hint: In the future to test everyone file prefix is also random, the end is a number
Introduction to Linux file system and Shell file system Ext2/ext3/ext4EXT2 is the standard file system in the Gnu/linux system. This is the most used file system in Linux, which is designed specifically for Linux, with extremely fast speeds and
Tag: blank linux target password nullHomework
1, request to add a user newuser, if it already exists then display "The user USERNAME is exists", if present, add it and set its password to "[email protected]"
CentOS Shell Basics 2015-4-8 12th SessionThe first half of the classThe second half of the classHistory: Command history, save 1000 commands by default!! : Previous command!$: Last parameter of previous command!n: Executes the nth command in the
Bash of the Base Infrastructure Special Sex21. provides a programming environment Program: Instruction + data program programming Style: Process: command-centric, data-serving instruction; Object type: Data-centric,
Variable setting rules:Variable names can consist of letters, underscores, and numbers, but cannot start with a number.The default type of a variable in bash is a string type, and if a numeric operation is required, specify the variable type as
Use df-tph to view hard disk usage under Linux:sdua:/# Df-tphfilesystem Type Size used Avail use% mounted On/dev/vda3 ext3 2.0G 974M 940M 51%/udev tmpfs 16G 500K 16G
Organize multiple sources from the network.1, source and Point command, the same function, the source is different.The source command is a built-in command of the Bash shell, which comes from C shell. Another notation for the source command is the
Numeric OperationsNeed to use exprOne=' Expr5 + Ten' echo $one two points Note: there is a space between the expression and the operator, for example2+2Is wrong must be written2 + 2The complete expression is to be ' contained ' note that this
Shell scripting improves Date//view dates and times-S change Time date-s "2015-08-20 14:27:12"View time Date + "%y-%m-%d%h:%m:%s"-D Change Single time Date-d "-2 Days" +%f+%w Show weeks+%w show how many weeks this yearntpdate //Calibration time
Scripting: Stacking of commandsThe first line of any script:#!/bin/bash: The Interpreter pathIn addition to the previous # number as a commentExecute permission before script execution: chmod +x file nameCondition Judgment in bash:Condition Test
Input command hbase Shell entersTo view all tables that exist:ListTo view the table structure:Describe ' table name 'Query the contents of the table:Scan ' TABLENAME '-----For example have a student table to view it scan ' student 'Add, update data :
In general, you may need to switch the root user to another user for execution during the automation process, such as: OralceHowever, the execution of the command will return to the root user, continue to execute other commands under the root
First, Introduction1. Variable type:User-defined variables (local variables)Environment variables: Define each user's operating environment, has learned path,ps1; to be permanent, write to the corresponding locationPre-defined variablesPositional
Because the shell appears to be a common feature between UNIX systems and is standardized by POSIX. As a result, shell scripts can be applied to many systems once they are "written attentively". Therefore, the reason to use shell scripts is based on:
On Linux, we can easily use the SCP command to copy files remotely, but because the SCP command itself has no save password option, so in the shell can not be like samba that way to save the password, more trouble, the following two implementation
Switch from Linux shell array creation and usage tipsThe Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an
The Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an individual does when it comes to working with arrays.1.
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