Multi-person chat room based on socket network communication under Linux

Service side#include #include#include#includestring.h>#include#includeinch.h>#include#include#includeChar* nam[ -];intCount =0;intcfd[ -];intCLIFD =0;void* Pthread_chat (void*Arg) { int*p =Arg; intn = *p; while(1) { Charbuf[255] = {};

linux-Process Management

Process ManagementView processProcess ControlJob ControlProcess priority======================================PS Process SnapshotView processes running on the current terminal #ps #ps Aux#ps AUXFA can only view all terminal processes U Show process

Linux environments Create swap partitions

Recently in the ready to run on the mobile side of the deep learning training model, on the RK3399 board installed scipy times wrong. Online check, because of insufficient memory, make a swap partition is done. So how do you swap partitions? Talk

Linux file Search command which, Whereis

Which/usr/bin/whichSearch for the directory and alias information for your commandwhich LSAlias ls= ' ls--color=auto '/usr/bin/lswhich RMAlias rm= ' Rm-i '/usr/bin/rm/bin/rm/tmp/test2 this without asking for confirmation, delete

Linux Server time synchronization automatically

The most common is the Rdate serviceInstallation (CentOS for example):Yum InstallUsage:Time-b.nist.govAfter the execution of the above method time is synchronized. Some servers are not allowed to be separated for a period of time, so we have to add

The difference between single quotes and double quotation marks in Linux

"‘‘``The single quote "is equivalent to the contents of the content directly output." Does not take into account whether there are variable commands, etc.Double quote "" Only variable command will be output directlyAnti-quote ' ' both

Linux Basic Learning-user's creation modification Delete

User Add Modify Delete1 Useradd adding usersAdd a new user hehe, specifying a UID of 3000 and a home directory of/home/haha[[email protected] ~]# useradd -u 3000 -d /home/haha hehehehe:x:3000:3000::/home/haha:/bin/bash[[email protected] ~]# ls /home/

Linux kernel optimization

mainly refers to the system kernel parameter adjustment in the Linux system for the service application, the optimization does not have the standard,optimization According to the actual needs is the most appropriate. 1) Edit the kernel configuration

Linux Common Command Memo

Document Viewing and modificationVi/etc/hostsI modify the modeESC Exit Modification: Q Normal exit (File not modified: q! Do not save exit: X/:wq Save ExitCat/etc/hosts Document ViewModify HostVi/etc/hosts Reboot RequiredModify

A bug that performs IO operations in a Linux environment

Today the project has a wonderful request ... What is it?Backstage upload video, parse the length of the time, and the preview, and stitching together, however, the things are not too troublesome, very quickly written, after the local test also no

Linux Exercises-File search (in construction)

1. Find the main root of the/var directory and all files belonging to the group MailFind/var-u root-g Mail2. Find all files in/var directory that do not belong to root, LP, GDMFind/var! \ (-user root-o-user lp-o-user GDM \)3, find in the/var

Linux users, Rights management

Useradd account name-M add accountSU account name switch accountsudo passwd account name change passwordWhoAmI Current UserSSH user name @ip address remote controlCAT/ETC/PASSWD to see if the creation was successfulWho is currently logged insudo

Linux Mount HDD 180805

There are two ways to mount a hard disk on a Linux system:1, MOUNT/DEV/SDB1 (hard disk location)/HOME/TEMP1 (Mount position)2, NTFS-3G/DEV/SDB1 (hard disk location)/HOME/TEMP1 (Mount position)If the hard disk location cannot be determined at this

Zhangminghui-linux Common Catalogue-2

/etc/sysconfig/i18n setting the Linux system character setEnglish: lang= "en_US. UTF-8 "English: lang= "EN_CN. UTF-8 ""You should develop the habit of using English." Set Idle timeout timeExport tmout=10 (timeout is 10 seconds, unit is

Basic Linux Learning (7)

Seventh chapter-User and user group Management one. User Profile 1. User Information file/etc/passwd:(1) User Management Introduction: So the more server security requirements of the server, the more need to establish a reasonable level of user

Linux Command experiment

WHOAMI View Current Usersudo adduser user name add userSU User name Switch usersudo adduser lilei Create userGroups Lilei viewing user groups to which users belongsudo usermod-g root lilei gives root privilegessudo deluser lilei--remove-homeLs-l

Linux under Jenkins Pack apk

svn

The development of Android often requires: development environment, test environment and production environment test our application in three environments, often encounter such a situation, testers find developers say, can give me a XX environment

Basic Linux Learning (5)

Fifth chapter--text editor vimI. VIM common operation 1.Vim Introduction: Vim is a powerful full-screen text editor, the most commonly used text editor on Linux/unix, it is to create, edit, display text files.    Vim has no menu, only commands.

Search for the position of Characters in the document in Linux

1. Find a line of content in the service. xml file containing the connector contentGrep-N connector./server. xml 2. query the rows matching the specified string from the file content and print the query results.$ Grep "searched string" File Name 3.

The detailed description of Linux struct utsname structure is utsname function usage instructions

[Uname System Call] Function Description:Obtain the current kernel name and other information.Usage:# Include Extern int uname (struct utsname * _ name) _ Throw; Parameters:_ Name: indicates the buffer zone for storing system information. The

Total Pages: 5467 1 .... 5296 5297 5298 5299 5300 .... 5467 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.