64. Shell Command, MV, RM, mkdir

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-

49. Linux shell commands, host, NSlookup, and dig

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-

40. Common Linux Shell functions: mkdir, rmdir, and mount

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 in Shell

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

Shell script while read line causes the loss of tabs

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

Several tips in BASH Shell

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 "

Linux learning materials, Linux learning books (Entry books, shell programming) recommended

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

65. Shell, input/output redirection

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> ② ③>

The shell script automatically restarted after the monitoring process crashes in linux

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

Use SharpShell to quickly implement Windows Shell Extension

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

Two shell scripts for network card Traffic Statistics (using ifconfig)

Code 1: Copy codeThe Code is as follows :#! /Bin/bash # Network card Traffic Statistics # Link: www.jb51.net # Date: 2013/2/26 N = 10 DateRm-rf/tmp/ifconfig_logWhile ($ n> = 0 ))DoN = $ ($ n-1 ));Date>/tmp/ifconfig_logIfconfig

Shell programming Basics

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

Shell script for monitoring disk usage (local + Remote)

Monitordisk. sh: Copy codeThe Code is as follows :#! /Bin/bash # Updated: PM By: leif (liangliwen@163.com) EMAIL =/usr/local/bin/email /Bin/df-h>/tmp/df.txt USE = 'df-H | grep-o [0-9] * % | grep-o '[0-9] \ +'' For I in $ USEDoIf ($ I> 95 ))Then$

JavaScript uses Node. js to write Shell scripts.

eol

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

Shell string operations (length, search, replacement)

Copy codeThe Code is as follows: Filename = '/home/admin/jobs/CnClickstat/DFSLoader/loader. cfg' # Use shell strings BuName1 =1 {filename # */jobs/} # Get 'cnclickstat/DFSLoader/loader. cfg 'by removing

The third day of linux Shell Study Notes

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

Delete duplicate files in linux shell with only one copy

#! /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

Linux shell capture Error Log script

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

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

Chapter 5 Study Notes of Linux Command Line and shell script Programming

$ Cat test.txt line1line2line3line4 $ Sed-I '/line/{n; d}' test.txt $ cat test.txt line1line2line3line4 $ Sed-I '/line1/{n; d}' test.txt suzhaoqiang @ suzhaoqiang-OptiPlex-380 :~ /Android/source/linux_learned $ cat test.txt line1line2line3line4

Total Pages: 541 1 .... 231 232 233 234 235 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.