1. mv
1) mV-move (rename) files
MV [Option] source dest
MV [Option]... source... directory
Rename source to DEST, or move source (s) to directory.
2) Options
①-F, do not prompt before Overwriting
②-I, prompt before Overwrite
③-N, -- no-
1. Host
1) DNS lookup Utility
Host option {name} [server]
Use/etc/resolv. confMedium serverAs the source of the DNS server
2) Option
-A: lists detailed host name settings for this host.
3) Example
Host www.google.com
2. NSLookup-
1,Mkdir
-M, -- mode = mode set file mode (as in chmod), not a = rwx-umask
-P, -- parents no error if existing, make parent directories as needed
Mkdir-P dir1/dir2 // IfDir1Does not exist, also createDir1
Mkdir-M 755/usr/dir3 // and setMode
2,
EXEC command in Shell
1.-exec parameter in find
In the current directory (including subdirectories), find all TXT files and find the rows containing the string "bin"
Find./-name "*. txt"-exec grep "bin "{}\;
Delete all TXT files in the
Description:
Although the problem is not big, it is really disgusting. My goal is to process access logs.
Logs are separated by \ t for easy processing. data needs to be filtered and processed.
I don't want to filter it into a temporary file and
1. for arithmetic operations. There are several assignment methods:
Let a = 1 + 2Echo $
A = $(3 + 3 ))Echo $
A = $ [4*4]Echo "$"
Set $ [A = 5*5]Echo "$"
2. Determine whether a directory exists:If [-d "$ (PWD)/.../candpointer"]; thenEcho "
Here we recommend a few Linux books and good tutorials to help learners avoid detours. It can make boring things fun. Isn't it?
First recommended entry-level books:
Laruence's Linux basic learning for Private food (3rd)
It explains Linux in a
1. Redirect related file descriptors
1) file descriptor
①0 standard input,/dev/stdin->/proc/self/FD/0
②1 standard output,/dev/stdout->/proc/self/FD/1
③2 standard error output,/dev/stderr->/proc/self/FD/2
2) redirection
①> Is 1>
②
③>
========================================================== ==========
This article is the original khler, and the original author information and the original link of this article must be kept completely and completely reprinted.
Author: HeYuanHui
E-
After the CLR in-process side-by-side feature is introduced in. NET 4, we can use C # To compile Windows Shell. We can find related examples In Microsoft's All-In-One Code Framework. There are also several articles about it In the yard:
Windows
1. Introduction to file typesLinux mainly includes the following seven file types: d directory-common file l symbol link s socket file B device file c character device file p name pipe File
2. Regular ExpressionRegular Expressions are very important
Access Parameters
You can use process. argv to access the command line parameters. It is an array containing the following content:
[NodeBinary, script, arg0, arg1,...]
That is to say, the first parameter starts from process. argv [2]. You can
Day 3: Select Conditions
Outline
Application Instance Analysis
Conditional Test
If... Else... Fi
Case... In... Esac
Implementation menu:
After the script is executed
Press 1 to display the current time
Press 2 to display the CPU load
Press 3 to
#! /Bin/bash# Name: remove_one.sh# Purpose: Find and delete duplicate files. Only one sample is retained for each file.# Sort and output files by sizeLs-lS | awk 'in in {# Obtain the total number of the first row and discard it. Read the next
Background any program running will inevitably generate a lot of logs, of which error logs need to be the most concerned. In some cases, the error log and the normal log are separated, but our system does not. What's more troublesome is that one log
Write SHELL scripts to monitor hosts
1. Run the vi command to create a script file sysmon. sh in the/root directory:
The content is as follows:
#! /Bin/bash
Dug = $ (df-h | grep "/$" | awk '{print $4}' | awk-F % '{print $1 }')
Cug = $ (expr 100-$
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