Linux build (load) dynamic library static libraries and load sample methods _linux Shell

Generation of dynamic libraries: 1,/*mysum.c*/ Copy Code code as follows: #include #include "src.h" int sum (int a,int b){return (A+B);} 2,/*mysum.h*/ Copy Code code as follows: #ifndef __src_h__ #

Shell Script Learning Guide [i] (Arnold Robbins & Nelson h.f Beebe) _linux Shell

The first chapter skips, the bottom starts from the second chapter, everybody understands.PS: Here is a very important thing when my egg hurts, very! Already code article code to the fourth chapter, the tragedy of the wrong browser button to refresh,

Implement string reversal method in shell share _linux shell

In the process of doing keyword cleaning, you need to filter out a class of words that do not conform to the end of a word, the idea is to put this batch of words according to the last word sort, so think of the first of these words to reverse, such

Shell implementation Arithmetic Simple method _linux shell

1. Simple method Copy Code code as follows: $ b=$ ((5*5+5-3/2)) $ echo $b 29 In the Linux shell, we can use $ (()) to put an expression in parentheses to achieve the function of the operation. 2. Other methods: Using:

Nginx Log Cutting script sharing _linux shell

Implementation method One #!/bin/bash logs_path= "/data/application/nginx/logs" pid_path= "/data/application/nginx/nginx.pid" Month= ' Date +%y-%m ' date= ' date +%y-%m-%d ' time= ' date +%h ' waittime=$ ( (24*60*60)) logcut () { CD $Logs

Shell Implementation Fizzbuzzwhizz Example (Pull network interview question) _linux Shell

Question: Https://www.jinshuju.net/f/EGQL3D Language: Shell (Bash)Operation mode:SH num-game.sh digit 1 digit 2 Number 3If you do not want to use the method of passing numbers, you can modify num-game.sh line 9th tonum=$*Tonum= ' number 1 digit 2

Shell script realizes SSH automatic login function sharing _linux shell

ssh

FileName: Ssh_auto_login Copy Code code as follows: #!/usr/bin/expect ## # SSH Analog Lander # # @author Zhiyuan ## If {$ARGC Puts "Error params: $argv" Puts "Expect params:user passwd IP port [translate_id]" Exit 1 } Set

A concise summary of command line formats common to Linux shells _linux shell

Copy Code code as follows: #在后台执行 cmd command CMD & #命令序列. Execute multiple commands on the same lineCMD1; Cmd2 Execute multiple commands in a #在当前 shell in a set of forms{cmd1; cmd2;} Execute multiple commands in a #在子 shell in a set

Three methods of shell kicking _linux shell

First Use W to view the current logged-in user, run the W command is the current user, need to keep, other all kicked off. Method One, the traditional way to find the names of other terminals, and then find the response process to kill Copy

Use Plink tool in Shell to implement remote batch shutdown _linux Shell

My operating system is centos6.4. Operating system: Rhel 6.2 x86_64 Download and install the Putty software package, I downloaded the putty-0.62-1.el6.rf.x86_64.rpmDownload the address below: HTTP://RPM.PBONE.NET/INDEX.PHP3 1. Remote Host IP

Real-time view of system traffic shell script sharing _linux Shell

Copy Code code as follows: #!/bin/bash While ["1"] Todo Eth=$1 rxpre=$ (Cat/proc/net/dev | grep $eth | tr: "" | awk ' {print $} ') txpre=$ (Cat/proc/net/dev | grep $eth | tr: "" | awk ' {print $} ') Sleep 1 rxnext=$ (Cat/proc/net/dev |

Shell script counts the number of directories and files in the current directory _linux shell

Linux how to count the current directory under the number of files, and how many directories? Write a script with the shell below, put it in the current directory, and execute it. Copy Code code as follows: #!/bin/bash #脚本名称

Shell periodically deletes files before the specified time _linux shell

Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the

Nested execution expect command instance _linux shell in shell

Always want to write expect action in the Bash script, so I do not have to write two scripts to execute, and made a little achievement in the afternoon finally, to show you. System: CentOS 5.x 1. Install expect first Copy Code code as

Shell script to determine if the Apache process exists _linux shell

Write a script to check whether the Apache process exists, if it does not exist, the display does not exist, if it exists, display the number of processes, when not equal to 10, notify the administrator in red font, and ask the administrator whether

The shell script implements a gentle way to restart the CentOS system _linux Shell

The main purpose is to restart the background of more important processes, if the use of killall-9 forced kill, may cause problems. such as database processes. The code is as follows: Copy Code code as follows: #!/bin/sh If [-Z "$"];

Command line A new method of adding an account number (Shell.users) _dos/bat

But add the user, this one shell.users is enough. This may also be a new method of adding a user, possibly with the deletion of Net.exe and no ADSI. The code is as follows: Js: Copy Code code as follows: var o=new activexobject

Shell+linux Command Implementation log Analysis _linux Shell

The IP that lists the most visited times of the daycommand: Copy Code code as follows: Cut-d--F 1/usr/local/apache2/logs/access_log |uniq-c | Sort-rn | Head-20 Principle: Copy Code code as follows:        cut   

Example of splitting strings in a shell _linux shell

For example, to split test= "AAA,BBB,CC cc,dd dd", you can Copy Code code as follows: arr=$ (Echo $test |tr "," \ n ") I can do that. Copy Code code as follows: old_ifs= $IFS Ifs= ', ' Arr= $test ifs= $OLD

System calls to get a process from Linux and parameters (troubleshooting cases) _linux Shell

When a program fails, there are times when you want to troubleshoot problems by understanding the system tuning that the process is executing. You can usually use Strace to track. But Strace is no help when the process is already in the D state

Total Pages: 541 1 .... 458 459 460 461 462 .... 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.