1. FindFind Pathname-options [-print-exec-ok]Let's take a look at the parameters of the command:Pathname the directory path found by the Find command. For example, use. To represent the current directory, and/to represent the system root
First of all, I personally understand the shell, I think the shell is a kind of command through a variety of control to implement the collection of Linux commands a batch processing of a scripting language.Shell programming is very simple, but the
Enter bind-P to view all keyboard bindings.
CTRL-related shortcut keysCTRL-A is equivalent to the Home Key, used to position the cursor to the beginning of the lineCTRL + B: move the cursor to the leftCTRL + C: Kill the current processCTRL + D:
If the notification area icon is usedProgramIt should be a graphical user interface program with a window,Like a common window program, you should create a main window and process window messages.
I. RelatedAPI
1,Shell_policyicon
Sends
PS1: the user's usual prompt.PS2: the first line is not complete. Wait for the prompt entered in the second line. Public setting location:/etc/profile Echo $ PS1 can see the current prompt settingsFor example, Green is displayed and time and shell
Windows cmd command line shell is often used in work, but the commands in it are too unaccustomed, such as using dir for column directories, etc, I prefer more Linux commands.
If you also hate windows cmd command names, you can install coreutils
1. Count the total number of rows of all common files in a directory
# Practical scenarios: when designing a graduation project, you need to calculate your ownCodeNumber of rows #
Solution 1:Find.-Type F-name"*. C"-Exec cat {}\; | grep-V'^ $'|
Job Control
Bash can run jobs in the background or in the foreground. A running
Program It is called a process or job. Each process has a process ID, PID. Generally, all programs run on the foreground. You can use Ctrl + D to send a signal to
A few days ago, I sent a redirection and pipeline-related usage method. Here are some interesting examples. Implement TCP/UDP-based software communication through redirection.
The Linux device contains a special file:
/Dev/[TCP |
Another interesting interview questionThe reason why I saw a question in "deep into the computer architecture" should be clear.
The questions are as follows:
Two identical functionsCodeAs follows,In the case of A, B, and C, please give three
Set exers = objws. exec ("pscp-r-SCP-PW" & password & "& loginid &" @ "& host &": "& data_path & filename &" "& windows_path) However Test Of Hour When copying Bay File Ratio Relatively Large, copy Longer Bay time Of Hour When it comes
I don't have a tutorial. Let's talk about it!We get a shell. If we want to know more about it, we can't trace it in depth. There is no shortcut! You have to pay a lot of time and thinking and analysis. If you cannot do this, please give up. It is
Tag: Shell
Shell task control terms:
(1) Foreground task: Run in shell. The shell prompt does not appear before the task is completed, so other tasks cannot be run at the same time.
(2) Background task: Run in shell, but not exclusively in shell.
[From] http://blog.chinaunix.net/uid-168249-id-2860686.html
Reference: 1. system environment variables after a user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$
For Loop example
For Loop Syntax:
for VARIABLE in 1 2 3 4 5 .. Ndo command1 command2 commandNdone #!/bin/bashfor i in 1 2 3 4 5doecho "Welcome $i times"doneBash version 3.0 +Version#!/bin/bash for i in {1..5}do echo
I. Methods
Copy codeThe Code is as follows :/**
* Execute a shell command and return the string value.
*
* @ Param cmd
* An array composed of command names and parameters (for example, {"/system/bin/cat", "/proc/version "})
* @ Param workdirectory
*
1 case description
A company needs to install a centos operating system on a large number of servers. It is time-consuming and labor-intensive to manually install one. Therefore, it is very important to build a PXE Server. the system server is
BASH Shell simple progress bar small function, bashshell
Not to mention, directly add the script.
# processbar processbar() { local current=$1; local total=$2; local maxlen=80; local barlen=66; local perclen=14; local
Shell programming (3) shell Syntax Functions
To define a shell function, we only need to write its name, then a pair of empty parentheses, and then put the related statements in a pair of curly braces, as shown below:
Function_name
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