The following three functions open a standard I/O Stream.
#include *fopen( *restrict pathname, **freopen( *restrict pathname, *restrict type, FILE **fdopen( filedes, *
The differences between the three functions are:
(1) fopen open a
The following two functions provide the function of inputting a row at a time.
#include *fgets( *restrict buf, n, FILE * *gets( *
Both functions specify the buffer address, and the row to be read is sent to it. Gets reads from the standard
Program list 5-1 use getc and putc to copy the standard input to the standard output
# Include (c = getc (stdin ))! = (Putc (c, stdout) =
Program list 5-2 Use fgets and fputs to copy standard input to standard output
# Include (fgets (buf,
Hard link: new name of ln source file
Points to the same file and exists independently. Deleting a source file does not affect the reading of hard-link files. You cannot create a connection between a file system and a directory.
View the file
. When you open or create a file using the standard I/O library, we have associated a stream with a file.
For the ASCII character set, one character is represented in one byte. For international character sets, a single character can be expressed
1. Go to the official website. Of course, you can download the X11 version. Here, I set up an environment in windows. There is built-in gcc in linux, which is not as troublesome as windows, and minGW has to be installed. Of course, I integrated it
Using Linux shell is my basic daily work, but I often forget some useful shell commands and l skills. Of course, I can remember commands, but I can't remember how to use them to execute a specific task. So I started to record these usage in a text
During the process of learning Linux, there are always some basic concepts that plague me. For example, what is the kernel? What is the relationship between the console, Shell program, and kernel? This time, we summarized these unclear concepts
In some production platforms or security audits, we often see a lot of users connect to the same server by using SSH, or the processes that are not properly closed after the connection still reside in the system. It is also necessary to limit the
Rpm and yum are used to install software and programs in linux. Let's take a look at the differences between rpm and yum in linux. I hope this article will help you.
Differences between yum and rpm
Rpm is a software package management method
Sendmail is an automatic mailbox sending function in linux, but this function is not available by default. We must enable sendmail, next let's take a look at how to send mail by installing and configuring sendmail in linux.
Sendmail
Samba is a free software that implements the SMB protocol on Linux and UNIX systems. It consists of servers and client programs. Let's look at the samba server configuration method in linux, I hope the article will help you.
SAMBA
Postfix is the MTA software developed by Wietse Venema under the ibm gpl protocol. Postfix is an attempt by Wietse Venema to provide alternatives to the most widely used sendmail. Let's take a look at the postfix configuration and installation
SpamAssassin is a mail filter installed on the mail servo host to identify spam messages. It uses a large number of Preset rules to check spam. These rules will check the headers, inarticles, and senders of all emails sent to the domain. His
Debian refers to a cooperation organization dedicated to creating a free operating system and its work. Because many kernel branches of the Debian project mainly use the Linux macro kernel, in addition, most of the basic tools created by Debian
This article mainly introduces the configurations required to write shell scripts under eclipse on the linux platform. The main steps are as follows:
1. Download and configure eclipse.
2. download and install the ShellEd dependency component
Centos 6 VSFTP Disable SELinux and enter
Vi/etc/selinux/config
SELINUX = enforcing changed to SELINUX = disabled
Disable selinux and enter
Setenforce 0
You can temporarily grant the root permission to transfer data.
Vi/etc/vsftpd/user_list
#
The fcntl function can change the nature of opened files.
#include fcntl( filedes, cmd, ... -
In each instance in this section, the third parameter is always an integer, which corresponds to the annotation section in the function prototype shown
1. Add a file
Consider a process that adds data to the end of a file. Early UNIX systems did not support the open O_APPEND option, so the program was written in the following form:
( lseek( fd, , )
This program works normally for a single process.
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