Eject and retract the optical drive under Linux

Eject Optical Drive#include#include#include#include#include#define DEVICE "/dev/cdrom"int fd = open (DEVICE, o_rdonly| O_nonblock);if (FD Perror ("Unable to open" DEVICE);Exit (1);}if (IOCTL (FD, cdromeject)! = 0) {Perror ("Cdromeject ioctl failed");

Linux uses FIO to test disk IOPS

Linux uses FIO to test the IOPS of the disk 2013-09-23 10:59:21Category: LINUXFio is a great tool for testing IOPS, which is used for stress testing and validation of hardware, supporting 13 different I/O engines, including: Sync,mmap, Libaio,

Enter the year, then print out the perpetual calendar for that year, and identify the date of the day. Similar to the CAL-Y results under Linux.

Package com.qunar.training.questionDate;public class Permanent {public static Boolean isleapyear (int year) {//Can be divisible by 4 but not divisible by 100, or divisible by 400Boolean leapyear = false;if (year% = = 0 && Year% 400 = = 0) | | (Year%

A solution that uses both localhost and 127.0.0.1 to connect under Linux

Linux has just installed MySQL, tried to write a program to connect to MySQL, there are only local IP address to connect, and 127.0.0.1 and localhost can not accessSolve this problem main view 3 directions1 does the. hosts have IP mappings 2. Is the

Linux Basic Learning-catalog files and links

First, directory operations1.mkdir-p A/B/C/D recursive creation of directories2.PWD (Print working directory) displays the current directory path3.rmdir directory name, delete empty directory4.RM-RF file name, deleting directory-R Delete Directory-F

Linux kernel Cdev_init series functions (registration of character devices)

Each character device in the kernel corresponds to a variable of the CDEV structure, and the following is its definition: Linux-2.6.22/include/linux/cdev.hstruct Cdev {struct Kobject kobj; Each cdev is a kobjectstruct module *owner; Point to the

Linux command------ls

Common command-->. lsfunctionLs-->list: (List directory contents) is used to display the list information in the contents of the directory, and to distinguish between different file types by color, of course, you can display files to find

Linux obtains NIC Information

1 #defineMax_interface 642 3 intshowifs ()4 {5 inti;6 intRC;7 intsock;8 intIfnum;9 structifreq Ifr[max_interface];Ten //struct arpreq arp; One structifconf IFC; A -Sock =sockets (Af_inet, SOCK_DGRAM, ipproto_udp); -

Eight taboos in the 2015:linux of running

eight taboos in the 2015:linux of running      with linux The growing popularity of servers in the enterprise, advanced linux linux Course. I have known and contacted to engage in linux Operation and maintenance work colleagues and friends

Linux common view Hardware Device information command

1. Graphics card Information  DMESG | Grep-i VGA  Lspci | grep-i VGA //view video card information2.Dmidecode | grep-i ' Serial number 'View motherboard information to view the motherboard serial number3.CPU Information#通过/proc File System  Cat/proc/

For example, the list of Linux cores (two)

Working with listsI think the best way to become familiar with the core list feature is to look at some simple examples of material to better understand the chain list.Here is a sample. Include Create. Join. Delete and traverse the linked list.

Folder compression decompression package under Linux

Http://blog.sina.com.cn/s/blog_7479f7990100zwkp.htmlTAR-ZCVF /home/xahot.tar.gz/xahotTAR-ZCVF the directory to be packaged when the file name full path is generated after packagingExample: Package the/xahot folder into a/home/xahot.tar.gz

How to set the tab width in Linux (can be set permanently)

as in my previous article, you can set the tab width for the current user, or you can set the tab width for all users.I. Setting the tab width for the current user onlyinput command: Vim ~/.VIMRC then: Set tabstop=4//I have the TAB key width at 4

Linux processing leap seconds

Leap second Introduction can refer to Wikipedia https://zh.wikipedia.org/wiki/leap secondsLinux processing leap secondsLinux uses a UTC clock, and time synchronization is performed through NTP, which sends a leap-second event notification to the

The Linux yum and list combination

I'm using two sets . LinuxLinuxa IP : 192.168.10.101LINUXB IP : 192.168.10.102First, we are Linuxa Mount the optical drive and install FTP Serverthen install FTP server (on the same platform, i.e. Linuxa on)Modify FTP The main configuration file

Build trust relationships in batches in Linux to implement ssh password-less login scripts

Build trust relationships in batches in Linux to implement ssh password-less login scripts Purpose: Copy the ssh public key of the current machine to another machine, so that you can log on to another machine through ssh without a password. Usage:

Allow Internet access to intranet port forwarding

Allow Internet access to intranet port forwarding With a vro, PPPOE is connected to the network, and then configured. Connect the computer to the wireless network of the router and enter the Intranet IP address 192.168.8.1 Then go to the

RedHat6.1 and CentOS7 Network Configuration

RedHat6.1 and CentOS7 Network Configuration I. Introduction After installing RedHat6 and CentOS7 with VMware, You need to configure the network to connect to the network. The method is not the same. The following is a record. 2. Configure the RedHat6

Linux du and df commands

Linux du and df commands Some people asked me about the command for viewing the directory size in Linux. Now I want to summarize the two commands du/df I learned a while ago. In the past, the df and du commands were used because the program could

Install nodejs and websocket in centos

Install nodejs and websocket in centos Software environment: VitrualBox CentOS 1, 6.4 NodeJS v0.12.5 Installation Process: Step 1. confirm that the server has nodejs compilation and dependent software. If not, run the following command to install

Total Pages: 5467 1 .... 1991 1992 1993 1994 1995 .... 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.