Integer test: Do numeric size and equality comparisons$A-lt $B: Indicates whether it is less than$A-gt $B: Indicates whether it is greater than$A-le $B: is less than or equal to$A-gt $B: is greater than or equal to$A-eq $B: Indicates whether it is
Three kinds of time for files: (1)atime: Access time, refers to the time at which thefile was last read, You can use the touch command to change to the current time; ( 2 ) ctime : Change times ( change time chmod , chgrp , mv
There are many functions for querying on Linux systems. However, find is one of the best commands under Linux and its query functionality is very powerful. Next, let's look at its strengths.
The first is the syntax of find:
Find [Start
Bash is written on a command program file that is called on the machine.External commands are provided by each applicationProgram is by: instruction (algorithm) + data (structure)Process oriented
Command-centric, design algorithms, data
Detailed Anatomy of bash script programmingbackground: bash scripting is a crucial part of Linux learning, and it may be easy to complete a script, but it's not easy to make your own script write. Bash is almost always available for all Linux
Pipeline:1. Pipelines are the oldest form of inter-process communication between UNIX systems, essentially a virtual file that maintains a message queue in the kernel.2. Historically, pipelines usually refer to half-duplex pipes, allowing only
Module IntroductionNew contact on the line when the general will encounter supervise this tool, the instructor of this module is generally explained that this module is the monitoring process, when the process is hung, supervise will start the
FileType ()
Get the type of file
Get the file types under Windows
echo filetype ("D:\\lamp\\php5\\php.ini"). "";
Output file representation is a normal document
echo filetype ("d:\\lamp\\php5"). "";
Output dir indicates
Author:Zeng Hongan, a lecturer at Huaqing vision embedded College.
A well-known pipe, also known as FIFO, is a way of inter-process communication. FIFO has the following features:
1. Full Duplex Communication Mode, data first-in-first-out;
2. It can
We only introduce several simple inter-process communication mechanisms: clipboard, anonymous pipeline, named pipeline, anonymous pipeline and oil tank.You have used clipboard in normal times. For example, you have selected a piece of text in the
During this time, the pipelist tool in sysinternalssuite was used to view what namedpipe was used. After using the pipelist tool, I wanted to know how it worked, so I did a disassembly, but I did not expect it to be unexpectedly simple.
The
When we need to call system commands, we should first consider the OS module. Use OS. System () and OS. popen () for operations. However, these two commands are too simple to complete complex operations, such as providing input or reading command
S_isreg () regular fileS_isdir () directory fileS_ischr () character Device FileS_blk () block Device FileS_fifo famous Pipeline FileS_islnk symbolic link fileS_sock socket File
# Include # Include
Int open (const char * pathname, int Oflag,.../*
Sed is a non-interactive text editor that edits files or Copies files exported from standard input. The standard input may be from the keyboard, file redirection, string or variable, or a pipe file. Sed can edit small or large files at will. There
Control statements
Control statement
The control statements are as follows:
If (condition) statement [else statement]While (condition) StatementDo statement while (condition)For (expr1; expr2; expr3) StatementFor (VAR in array)
Linux Process Communication-pipelines and linux Process Pipelines
Inter-process Communication (IPC: Inner Proceeding Communication)
A process is an imaginary way for the operating system to realize that the program exclusively runs the system. It is
Shell acronyms and judgment symbols []1. The test command is used to detect the file type and compare values. Determine whether a file exists:
[work@www sh]$ test -e file.txt && echo "exist" || echo "not exist" not exist[work@www sh]$
As the name suggests, the formula in shell script is to determine whether a sub-statement meets certain conditions. There are several implementation methods in script:
1. Use the test command
Let's take a simple example. For example, to determine
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.