[-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
Unix_c_05.txt================Lesson Five Process Management================First, the basic concept------------1. Processes and Procedures~~~~~~~~~~~~~1) The process is the running program. A running program,There may be multiple processes. The
For more secure storage of files, Linux gives different permissions to different files, each with the following three permissions:
Owner permissions: What the file owner can do
Group permissions: Actions that can be made by the user
Basic format:Test expressionExpression constructed for the test command.Here expression is any valid expression that the test command can understand, and the simplified format will be the most common format that the reader may aiiowed seereturn
1. Process identifiersThe two basic identifier PID and PPID for the process described in the previous Process Description section will now detail the other identifiers of the process.Each process has a non-negative shaping that represents a unique
Transferred from: http://blog.csdn.net/fallenink/article/details/8480483Original address: http://sharp2wing.iteye.com/blog/1280802————————————————————————————————————————————————I.linux C Creating a directory function mkdir mode setting
This record Linux special permissions suid, SGID, sbit related knowledge and use examples.Because Suid and sgid involve system security, the mastery of their knowledge points is particularly important.
How to express and parse file
The Linux stat function explains:Table header files: #include #include Define functions: Int stat (const char *file_name, struct stat *buf);Function Description: Obtains file information by filename, and is stored in the structure stat referred to
[-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
Original address: http://blog.chinaunix.net/uid-24607609-id-2118151.htmlThe syntax for the most streamlined if command is:if TEST-COMMANDS; then CONSEQUENT-COMMANDS; fiafter the Test-command executes and its return status is 0, the
4. Input and output#! /bin/bash# Read users input and then get his nameread"Please input your first name: " firstNameread"Please input your last name: " lastNameecho-e"Your full name is: $firstName $lastName"Read usage:read[-ers][-a 数组][-d
8.1: IntroductionThis chapter describes the process Control for UNIX, including creating new processes, executing programs, and terminating processes. It also describes the various id--of the process properties, the actual, valid, and saved user and
1. File Test Actions----------------returns True if ...-e file exists-a file has the effect of this option with-e is the same. But it has been deprecated and does not encourage the use of-Ffileis a regular file (not a directory or device file)-s
User and user groups
Linux is a multi-user, multi-tasking operating system, in order for each user to have more confidential file data, so not see the rights management is more important. Linux file ownership and access authorization are
"Shell Script Basics"Create a script#vim 1.sh*********************#! /bin/bashecho "Hello world!"*********************#chmod +x 1.sh#sh 1.shHello world!Extensions and command extensions still work within double quotation marks.#echo "Can I have a
Get file size There are two ways to do this:Method One,Example:
Unsigned long get_file_size (const char *path)
{
unsigned long filesize =-1;
FILE *FP;
fp = fopen (Path, "R");
if (fp = = NULL)
return filesize;
Fseek (FP, 0L,
The syntax for the most streamlined if command is:if TEST-COMMANDS; then CONSEQUENT-COMMANDS; fiafter the Test-command executes and its return status is 0, the consequent-commands executes. The return status is the exit state of the last command, or
Includes common operating system features in Python's standard library OS moduleThe OS module introduces the following method: Import OSThe following are common usage methods for OS modules:1, OS.GETCWD get the current working directory, that is,
Here we mainly describe the status of the process, the status of the process can be viewed through/proc/pid/status, or can be viewed through the/proc/pid/stat. If you talk about tools, you can see the process information. Here we go through the/proc/
In the work and daily programming often need to determine the size of the file, some basic view of the way to do a summary.A. Linux shell EnvironmentDF can view the first-level folder size, usage scale, file system and its hang-in points, but there
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.