Level: Intermediate
By Michael Stutz
From: IBM developerworks China
Link: http://www.ibm.com/developerworks/cn/aix/library/au-badunixhabits.html
When you often use a system, it is often in a fixed usage mode. Sometimes, you do not get into the habit of doing things in the best way possible. Sometimes, your bad habits may even lead to confusion. One of the best ways to correct such defects is to consciously adopt the good habits of resisting these bad habits. This article presents 10
UNIX domain sockets are used to communicate between processes running on the same machine.UNIX domain sockets provide both stream and datagram interfaces. Create a pair of non-named, interconnected UNIX domain sockets. Socketpair1. Naming unix domain sockets1) Socket address format, under Linux as shown in struct Sockaddr_un {sa_family_t sun_family; char sun_path
I have been engaged in pythonWeb development for a year. Now I am confused. I mainly work on curd, that is, how to obtain data, and then present it to the front-end page. The framework uses django, optimization means adding memecache. Pay attention to this when querying the database. Currently, there are a lot of tangled issues: 1: the programming of process threads, how to use it in practice 2: network programming problems, the design and implementation of high-performance servers, I can't unde
Introduction: Do you know that blogging works in conjunction with UNIX (R)? UNIX's built-in Web and text processing tools enable you to create blogs quickly and easily. Explore some handy tips for improving the creative skills of UNIX blogs.
UNIX® has a lot in common with web blogs or blogs. In addition to being the native environment for most Web servers and th
1, in the linux bash Beijing time and Unix time stamp mutual transfer: Get UNIX Timestamp:
Command: Date "+%s"
Output: 1372654714
Get Beijing Time:
Command: Date ' +%y-%m-%d%h:%m:%s '
Output: 2013-07-01 12:55:56
Unix timestamp transfer to Beijing time:
Command: Date [email protected] ' +%y-%m-%d%h:%m:%s '
Output: 2013-07-01 12:58:34
Introduction to advanced programming in Unix environment: Basic Unix knowledge (III)
Some shame ~, I haven't updated it for a year and a half. I came to a new organization and made an embedded system as I expected. I thought it was okay;This time, I continue with the advanced programming series for the unix environment, hoping to stick to it :)1. programs and pro
A simple UNIX-Linux CFS annotation, unix-linuxcfsThis series is named simple UNIX, but it also includes the details of various UNIX-like systems. This series of articles are based on my study notes over the past few years, focusing on the analysis of various UNIX,
UNIX advanced environment programming (13) signal, unix programming 13 Signal
The signal is Soft Interrupt.
Signals provide an asynchronous way to process events. For example, you can press the End Process key on the terminal to terminate a process in advance.
1. Concept of Signal
Each signal has a name whose names are headers with SIG. For example, every time a process calls the abort function, a SIGABRT s
"Unix environment advanced programming" chapter 3rd-file I/O, unix environment Advanced Programming1. Introduction
For most Unix files, I/O only requires five functions: open, read, write, lseek, and close.
The functions described in this chapter are often calledI/O without buffering. TermsWithout BufferingIt means that the user's process will not automaticall
I recently studied Unix programming art. The first chapter is very good. It tells us a lot about the history and philosophical basis of Unix. The most important part is the 17 design principles mentioned. I know many principles, but I have never summarized them in such detail.
Most of the content below comes from the book "Unix programming art", which is
Build an advanced programming and learning environment in UNIX --- apue. h, unix --- apue. h
This course has just learned advanced programming in UNIX, but has encountered many problems when setting up the programming environment of this book. Fortunately, there are various solutions on the Internet that allow me to finally solve the problem. I would like to than
PROFTPD is a UNIX platform or Unix-like platform (such as Linux, FreeBSD, etc.) FTP server program, it is under the Free Software Foundation's copyright notice (GPL) under the development, release of free software, that is, anyone to comply with the GPL copyright notice, Can modify the source start code at will.
The PROFTPD design goal is to implement a secure and easily configured FTP Server. At present
[UNIX Network Programming] basic TCP socket programming and unix Network Programming
The concurrent server described in this chapter is a single customer Process Model Implemented by fork.
The following is the socket function of the basic TCP client/server program (the schedule of some typical events ):
TCP status transition diagram:
1. socket functions:
# Include
Family: protocol family (AF_INET, AF_
Several lines of code to call functions in the unix pipeline style, and several lines of unixAfter using linux, you basically know its pipeline, which is to use the output of a program or command as the input of another program or command.
To put it bluntly, let's look at how python can be used to call functions in the unix pipeline style.
#coding=utf-8class Pipe: def __init__(self, func): self.f
UNIX advanced environment programming (14) file IO, unix programming 14io
Spring is coming. In addition to work and study, everyone must exercise and exercise more.
Haidao, which was shot in haidao Huaxi, yuandu ruins park last weekend.
Go to the topic.
O_DIRECT and O_SYNC are flags that the system calls open. Open a file with a specific file descriptor by specifying the flag parameter.These two flags hav
Article Title: UNIX and UNIX-like system security check notes. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Here are some personal experience notes. I believe it is useful for UNIX or U
This configuration instance pro-test success, mutual encouragement, there are questions to everyone message.Environment: VMware + unbuntu 14.04For UNIX network programming, programming the first UNIX program encountered problems, can not contain unp.h file, this feeling and apue.h almost, but here need to compile source code, for later convenience, now tidy up as follows:The main 2.1 is to generate LIBUNP.A
extension of single UNIX specification provides the Getrlimit (2) function, which can be used to return the maximum number of descriptors that a process can open at the same time.Options:If we want to write some portable applications first, and these programs are related to the supported options, then a portable method is required to determine whether a given option is supported.As with restrictions, SUS defines three processing methods:
Com
# CD/USR/SRC
# tar Xvzf apache_1.3.6.tar.gz (Generate apache_1.3.6 directory)
# tar Xvzf php-3.0.8.tar.gz (Generate php-3.0.8 directory)
# CD apache_1.3.6
#./configure--prefix=/usr/local/apache (Set the Apache installation directory to/usr/local/apache)
# CD php-3.0.8
#./configure--with-mysql=/usr/local/mysql \
--with-apache=. /apache_1.3.6 \
--enable-track-vars (configuration support MySQL, as Apache function module, tracking variable valid)
# make; Make install
In the Configure parameter above
Java
Time
Javascript
Math. Round (new date (). gettime ()/1000)The unit of the value returned by gettime () is millisecond.
Microsoft. NET/C #
Epoch = (datetime. Now. touniversaltime (). ticks-621355968000000000)/10000000
MySQL
Select unix_timestamp (now ())
Perl
Time
PHP
Time ()
PostgreSQL
Select extract (epoch from now ())
Python
Import time first and then time. Time ()
Ruby
Obtain
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.