Some concept terminalsAlso called terminal equipment, early because the computer is more expensive, so a host will have multiple terminals, these terminals themselves do not have the computing power, only assume the input and output of information
Excerpted from http://www.comptechdoc.org/os/linux/usersguide/linux_ugshellpro.htmlTestsThere is a function provided by bash called Test which returns a true or False value depending on the result of the tested Expression. It syntax is:Test
$ () and "(anti-quote ) are used to do command substitution. Next, let's see ${} ... It's actually used for variable substitution. Shell if interpretation statements are common:[Front and rear spaces] Front Space[-D file] True if file exists and
IfIn the-ZTo-DThe meaning2011-09-05 10:30[-A FILE]IfFILEThe existence is true.[-B FILE]IfFILEExists and is a block special file is true.[-C FILE]IfFILEexists and is a word special file is true.[-D FILE]IfFILEexists and is a directory is true.[-E
Recently scripting, I often see conditional statements with the IF [-X $variable] class, not knowing what the meaning of the corresponding parameter is,The excerpt is as follows: from http://blog.csdn.net/aaaaatiger/article/details/1713611thanks!1[ -
A summary of the command that encountered test at work. (very often) work too busy to write documents too sloppy please forgive. I hope to be of some help to you.This article is only a summary of common work used in more. (At least I've used
The meaning of the-Z to-D in the conditional judgment in the shell
[-A file] if FILE existence is true.
[-B-file] True if file exists and is a block-specific file.
[-C file] is true if file exists and is a word special file.
[-D file] is true if
Getrlimit and Setrlimit functions
Every process has a set of resource limits, some of which can is queried and changed by the Getrlimit and Setrlimit Ons.
#include
int getrlimit (int resource, struct rlimit *rlptr);
int setrlimit (int resource,
The meaning of the-Z to-D in the conditional judgment in the shell
Copyright Notice: This article original articles for bloggers, repost please indicate the source. If in doubt, please contact me. I'll be appreciated.
Attention
1. Some platforms do not support Stat64,
2. Get the type of file size off_t,
The off_t type in Linux is a 32-bit long int (4 bytes) by default.
The file may overflow when it is too large.
It is recommended that GCC compile-time
Judgment file:Workdir=/home/tmplocal_list_file= $WORKDIR/local.list#if no Local.txt file, generate a new oneif [!-F "$LOCAL _list_file"]; ThenTouch $LOCAL _list_fileFiNote: Be sure to have a space, to determine whether the file exists, if it does
First article:
Copy Code code as follows:
operator meaning
-r file or directory readable
-w file or directory writable
-x file or directory execution
-o file or directory owned by user
-r file or directory to true user readable
-W
C Language Stat () function: Getting file statusheader file:
#include #include
To define a function:
int stat (const char * file_name, struct stat *buf);
Function Description: Stat () is used to copy the file state of
C language chmod () function: Modifying file permissionsheader file:
#include #include
To define a function:
int chmod (const char * path, mode_t mode);
Function Description: chmod () Changes the permissions of the
-B file file exists and is block special-c file file exists and is character sp
ecial-d file file exists and is a directory-e file file Exists-f file File exists and is a regular file-g file file exists and is Set-group-id-g FIL E file
[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if file exists and is a directory.[-E File] True if file exists.[-F file] True if file
First you can track the source path of intruders through the following system commands and configuration files:
1.who------(see who logged in to the system.) )
2.W--------(see who logged into the system and what it is doing.) )
The file is a very important concept under UNIX, not only using files to save data, but also using files to save directory information, to represent hardware devices, and so on. Unix filenames are case-sensitive, for example, "foo" and "foo" are two
Unix| Security
Here is a summary of some personal experiences that are believed to be useful for hacked Unix or unix-clonefreebsd,openbsd,netbsd,linux,etc:First you can track the source path of intruders through the following system commands and
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.