linux practice exam

Want to know linux practice exam? we have a huge selection of linux practice exam information on alibabacloud.com

Linux Practice Commands

group is readable, other users are unreadable and not writable, with the number set9. For Book.txt Read permissions to EveryoneTask four: Complete the following actions as required and record the process on the internship report1. Copy the/etc/man.config to/think, compress/think/man.config to Good.tar, and under/think/newBuild file bad.conf, Man.config, bad.conf simultaneously compressed to Ftpp.tar2. Displays the contents of the Ftpp.tar, creates a new file Top.txt, appends it to Ftpp.tar3. Un

Second, the Linux system hard links and soft links detailed introduction and practice

is This is-F oldboyfile #删除原始文件 is actually a hard link to delete a fileClearer: This is oldboyfile Hint: Strange, the content is still in, actually this is because has the oldboyfile_hard_link hard link existence, therefore even if deletes the oldboyfile, but still has the hard link to the file Inode node, therefore, At this point the file will not be released and deleted, and when the file Oldboyfile is deleted, only the connection oldboyfile to the Inode node of the file is deleted. [em

LAMP/LNMP Stage Practice Linux Common service Deployment and optimization

LAMP/LNMP Stage Practice Linux Common service Deployment and optimizationWe review them in the form of simulated actual needs. The requirements are as follows:1. Prepare two CentOS 6, one machine running MySQL, another machine running Apache and Nginx + PHP2. Install Apache and Nginx at the same time, which Nginx start 80 port, used to run static objects (image, JS, CSS), Apache listening 88 port, is respon

Linux OPS Practice-November 8, 2015-November 17 course Assignments (exercise) Summary

Linux OPS Practice-November 8, 2015-November 17 course Assignments (exercise) SummaryI. Homework (exercise) content:First, Iptables class workPremise: Input and output default policy is drop;1. The Web server that restricts the local host is not allowed to access in Monday; the rate of new requests cannot exceed 100 per second; The Web server contains the admin string and the page is not allowed; The Web se

Linux OPS Practice-August 30, 2015 Course assignments

Linux OPS Practice-August 30, 2015 Course assignments 1, summarize the text editing tool vim use method; Vim: Full-screen editor; Vim's editing mode: Edit mode: Command mode; The two meanings are probably the same. Input mode, last-line mode. Edit mode (switch to) input mode: Insert:i Append:a New Line:o Beginning of line: I End of line: A New row above: O Input mode à edit mode: Esc Edit mode, last-line mo

[Principle Analysis]linux The chain list principle in the kernel practice [2]

= null;head_node* pos;for (pos = head->next, DN = entry (pos); pos!=head; pos = pos->next, DN = entry (pos)) {showme (DN);}}The above code can see that the for loop operation and judgment are moved outside the curly braces, only the operation function is left inside the parentheses, and then we re-macro the For loop part of the code:#define List_each_entry (Head, POS) for (pos = head->next, DN = entry (pos); pos!=head; pos=pos->next, DN = entry ( POS))Based on the above macro, we then modify

Linux IPC Practice (1)--Overview

, but the customer can always get the loan in a limited time. (4) When the customer receives all the necessary funds, they will be able to return all the funds in a limited time.The problem of dining philosophersFive philosophers in a round table dining, everyone must pick up two forks to eat;The solution to the problem of dining philosophers: (1) Waiter solution: The waiter as a manager, the philosopher in the fork before the need to obtain the waiter's consent; (2) a maximum of 4 philosophers;

Linux process Practice (2)--zombie process and file sharing

main () {int inumber = 0; pid_t pid = Vfork (); if (PID = =-1) {perror ("fork"); return-1; } else if (PID > 0) {cout Example 2: case where the parent process/child process modifies global data int main () { int inumber = ten; cout //Example 3: Executes the Hello program under the current directory with vfork int main () {int inumber = 0; pid_t pid = Vfork (); if (PID = =-1) {perror ("fork"); return-1; } else if (PID > 0) {cout Test 4, execute the

Linux OPS Practice case-December 20, 2015-December 31 (first time)

Linux OPS Practice case-December 20, 2015-December 31 (first time)1. Create a 10G file system, type ext4, requires the boot can be automatically mounted to a separate data /data directory; Create a 10G partition [Email protected] ~]# FDISK/DEV/SDAWarning:dos-compatible mode is deprecated. It ' s strongly recommended toSwitch off the mode (command ' C ') and change display units toSectors (Command ' u ').Co

Linux IPC Practice (5)--system v Message Queuing (2)

/MSGRCV, Message Send/Receive practice **///1. Message sent int main () {int msgid = Msgget (0x1234,0666| Ipc_creat); if (MsgId = =-1) err_exit (" msgget error"); struct msgbuf mybuffer; for (int i 2. Message reception: The data is constantly taken from the head of the team int main (int argc, char *argv[]) { int msgid = msgget (0x1234, 0); if (MsgId = =-1) err_exit ("Msgget error"); struct MSGBUF buf; ssize_t NRCV; while (

Linux IPC Practice (4)--system v Message Queuing (1)

) err_exit ("Msgget error"); struct Msqid_ds buf; if (Msgctl (msgid,ipc_stat,buf) = =-1) err_exit ("Msgctl error"); printf ("Buf.msg_perm.mode =%o\n", buf.msg_perm.mode); %o print printf in octal ("Buf.__key =%x\n", Buf.msg_perm.__key); %x is printed in hexadecimal cout /** Practice: Ipc_set, generally need to get first, and then set **/int main () { int msgid = msgget (0x255, 0); if (MsgId = =-1) err_exit ("Msgget erro

Embedded Linux Introduction to Practice

Starting today, use this blog to record and summarize embedded Linux from getting started to practicing the complete process.The first chapter is the IIC protocol and self-balancing trolley. Set goals First:1, using the MINI2440 Development Board IIC Protocol, the acquisition of MPU6050 six-axis sensor data.2, the step 1 is organized into a drive, written to the Linux kernel.3, write a simple upper computer

20135327--linux Kernel Analysis Practice II

"Print Current Task info\n"); -Printk"pid\ttgid\tprio\tstate\n"); - for_each_process (pcurrent) { thePrintk"%d\t",pcurrent->pid); -Printk"%d\t",pcurrent->tgid); -Printk"%d\t",pcurrent->prio); -Printk"%ld\t",pcurrent->State ); + } - return 0; + } A Static void__exit Print_exit (void) at { -PRINTK (Kern_info"Module finished!\n"); - - } - - Module_init (print_init); inModule_exit (Print_exit);3. Compile the moduleNext write Makefile.1 obj-m:=printname.o2 current_path:=$ (shell pwd)3 linux

Grub legacy Practice of making small Linux

. provide configuration files to grub;/mnt/boot/grub/gtub.confDefault=0Timeout=5HiddenmenuTitle MinilinuxRoot (hd0,0)kernel/vmlinuz-2.6.32-696.el6.x86_64 ro Root=/dev/sda3 selinux=0 init=/bin/bashInitrd/initramfs-2.6.32-696.el6.x86_64.img9. Copy the/bin/bash command and its shared library file to the corresponding directory under/mnt/sysroot/can copy other commands, such as I copy the LS command, of course, you have to copy the library file, with which to see the location of the command, with th

12 Practice examples of GREP commands in Linux

grep-e 12. Search for a fixed match stringFgrep is used to search for a fixed-style string in a file or file list. function with Grep-f. A common usage of fgrep is to pass a file containing a style to it: $ sudo fgrep-f file_full_of_patterns.txt file_to_search.txt This is just the beginning of the grep command, and you may have noticed that it is simply too useful to implement a variety of requirements. In addition to this one-line command that we run, grep can also be writte

The practice collection of regular expressions in Linux

"[0-9]{4,}"9, add user Bash, Testbash, basher, SH, nologin (its shell is/sbin/nologin), find the/etc/passwd user name with the shell name of the linegrep "(^.) \>.\10, take advantage of DF and grep, remove the disk partition utilization, and from large to small sortDF |egrep "\%."-o|sort-nr11. Display three user root, Mage, Wang Uid and default shell (C7 instead)CAT/ETC/PASSWD |egrep "^ (root| C7) "|cut-d:-f1,312. Find the line at the beginning of the/etc/rc.d/init.d/functions file that has a w

(i) Linux timed Task Setup crontab basic Practice

a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an emailhome=///user-run path, here is the root directory# Run-parts* * * * * root run-parts/etc/cron.hourly//hourly executionScripts with

Linux Operations Practical Practice case 20151220~20151231

1, the creation of a 10G file system, the type of EXT4, requires the boot can be automatically mounted to a separate data/data directory;#fdisk/dev/sda Welcome to fdisk (util-linux2.23.2). The changes will remain in memory until you decide to write the changes to disk. Think twice before you use the Write command. Command (input m get help): P disk /dev/sda:128.8GB,128849018880 byte,251658240 sector units = sector of1*512=512bytes sector size (logical/Physical):512 bytes / 512 byte i/o size (min

Linux process Practice (5)-Daemon process

)/ / err_exit ("Setsid error");// else// cout RETURN VALUEOn success, the (new) session ID of the calling process is returned. On Error, (pid_t)-1 was returned, and errno is set to indicate the error.Daemon API in Linux int daemon (int nochdir, int noclose);Parameters:Nochdir:=0 changing the current directory to "/"Noclose:=0 REDIRECT standard input, standard output, standard error to "/dev/null"DESCRIPTION thedaemon () functionis

Linux IPC Practice (9)--system v shared memory

(Student), 0666| Ipc_creat); if (Shmid = =-1) err_exit ("Shmget error"); Connect the shared memory in a readable, writable manner Student *p = (Student *) Shmat (shmid, NULL, 0); if (p = = (void *)-1) err_exit ("Shmat error"); strcpy (P->name, "Xiaofang"); P->age = 22; SHMDT (P);} The Read program int main (int argc,char **argv) { int shmid = shmget (0x1234, 0, 0); if (Shmid = =-1) err_exit ("Shmget error"); Connect the shared memory in read-only mode Studen

Total Pages: 13 1 .... 9 10 11 12 13 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.