The zero-based Linux 15th chapter

Source: Internet
Author: User

From zero and the 15th chapter of Linux


Hello ~ ~ Students, another happy week to the end of ~ AH ~ time has been very fast, unconsciously small and updated blog to provoke ~ ~ ~

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/29f50e45b6f005da4c9940c6812e78a7.gif "title=" 10b8ce7ab5b0d617.gif "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:200px;height:200px; "alt = "29f50e45b6f005da4c9940c6812e78a7.gif"/>

(↑ A small compilation of frustration)

Passer-by: "Oh??" The little master don't want to teach us ... "

No, it's not. ~ ~ How can I abandon you? ~ ~ Recently, there is not much time ~ Recent small series in the construction of lamp, vsftp services, NFS services, based on the Lamp build NFS and samba services, feel a little bit of difficulty ... Alas?? Passers-by B actually laughed at small, these are also you want to do after Oh ~ ~ Then do not come out, small make up will not give you tell the second time, and, and, small series of arduous only because the experiment too much, but small series but will do ~ ~


Well, gossip not much to say ~ ~ Small series on the introduction of this chapter of the content Bar ~ After the introduction, the small series to continue to do experiments to provoke ...


So the last chapter, the small part of the mkdir to introduce the creation of directories , treeView directory trees and halt,poweroff,reboot, Shutdown These shutdown and restart commands, the Shutdown command also supports a timed switch , and the Shutdown command also supports broadcast functions.

Passers-by: "Small, adult, this broadcast function on the previous chapter did not say ..."

... The amount ... Well, it is a small part of the negligence ~ ~ now give the students to introduce it ~

The so-called broadcast function, which is actually said when the timer shutdown or restart, will be used for the owner of the host is displayed, because in the real world, the use of this host is not only you, there will be other people to connect to the machine remotely, when the direct shutdown, it will affect the use of others, It is possible that someone else is writing a script, or modifying the file, and you directly shut down the machine, will cause the loss of this data, to avoid this situation, when the shutdown or restart the use of timing, the previous chapter small description of the Shutdown command format:shutdown [OPTIONS ...] [TIME] [WALL ...] , and this WALL is broadcast, can not write, the default timing will be sent to all terminals:

650) this.width=650; "src=" Https://s5.51cto.com/oss/201710/28/7e8eeaad0572e0849239b7c3ede1ecd8.png "title=" Qq20171028150416.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:130px; "alt = "7e8eeaad0572e0849239b7c3ede1ecd8.png"/>

Small series on one of the terminal set timer five minutes after the shutdown, and in another terminal can also be displayed, and the other terminal of the small series of course the connection is also this host:

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/684c2780108a38ebcbbee15e392918fe.png "title=" Qq20171028150426.png "width=" 550 "height=" "" border= "0" hspace= "0" vspace= "0" style= "WIDTH:550PX;HEIGHT:116PX;" alt = "684c2780108a38ebcbbee15e392918fe.png"/>

This is a small series of two different terminals connected to the same host, you can use TTY to view

650) this.width=650; "src=" Https://s2.51cto.com/oss/201710/28/024cc9c9db6ae07534ebeac430201923.png "title=" Qq20171028150648.png "width=" 550 "height=" 103 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:550PX;HEIGHT:103PX; "alt = "024cc9c9db6ae07534ebeac430201923.png"/>

650) this.width=650; "src=" Https://s4.51cto.com/oss/201710/28/0b4c4ed72a4df53d956bb10c1cfb5403.png "title=" Qq20171028150654.png "width=" 550 "height=" 134 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:550PX;HEIGHT:134PX; "alt = "0b4c4ed72a4df53d956bb10c1cfb5403.png"/>

This command before the small, used to view the current terminal, it can be clearly seen that the two terminals are different, when the students in a terminal set shutdown or restart, another user using the terminal to see this hint, if he has some work not done, will contact you to let you cancel the timing, Because the person using the terminal login is not defined as the administrator root user, but an ordinary user, the normal user cannot cancel the timer ~ Then, after contacting you, you can cancel the shutdown or restart to avoid data loss:

650) this.width=650; "src=" Https://s2.51cto.com/oss/201710/28/5fea0f199c1ffa3169580e7afd0fd9fe.png "title=" Qq20171028151010.png "width=" 550 "height=" "" border= "0" hspace= "0" vspace= "0" style= "WIDTH:550PX;HEIGHT:116PX;" alt = "5fea0f199c1ffa3169580e7afd0fd9fe.png"/>

Of course, the other end will still receive the prompt:

650) this.width=650; "src=" Https://s4.51cto.com/oss/201710/28/5b146ae5415337e8d33c3f03d77c916c.png "title=" Qq20171028151018.png "width=" 550 "height=" 108 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:550PX;HEIGHT:108PX; "alt = "5b146ae5415337e8d33c3f03d77c916c.png"/>

Students of the machine if not installed Xmanager software or SECURECRT software, switch terminals will be very inconvenient, and can connect the terminal is very limited. Because small to catch up with the progress, so the two software how to install not to introduce to the students, the two software is used to connect the students of the Llinux, the small part of the Xmanager software used in the Xshell. As for the two software, the small part of the time when sufficient to simply introduce to the students ~ ~ (Spit Groove: false, so lazy small series will not work overtime to introduce us)


The last chapter left the content, to this end of the introduction ~ ~ Now, the small series on the introduction of this chapter of the content ~ ~


In fact, the contents of the two chapters in the fourth chapter of the introduction of the file system will be to the students to tell, because this is the basic operation, but the middle also some more basic, so the small series has been until now to talk with the students ~ ~

Through the 13th chapter and the 14th chapter of the content, the students have a further understanding of the operation of the file system, um ... Learned to create files and create directories, but also learned some of the accompanying skills ~ ~

The previous chapter, the small series also introduced the deletion of the directory command rmdir, but this command can only be used to delete empty directories, so there is a great limitation ~ ~ So, small in the last mention of the very very evil command RM command, this chapter introduces:

RM: Deleting files or directories

So, how do we use such an evil command? Or do you want to look at the man document first?

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/a8d1075a62d701ecb99ea12106fa50ca.png "title=" Qq20171028152548.png "width=" 550 "height=" 204 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:550PX;HEIGHT:204PX; "alt = "A8d1075a62d701ecb99ea12106fa50ca.png"/>

As you can see from the man document, the command is in the following format:

RM [OPTION] ... FILE ...

RM followed by the option, and then keep up with the file to be deleted (here the file refers to a file or directory), small series to experiment, in the/app/directory to create some files and directories, to delete

650) this.width=650; "src=" Https://s2.51cto.com/oss/201710/28/463c98cc4c12dec3ec87f9c9d4550fa8.png "title=" Qq20171028152916.png "width=" 550 "height=" "" border= "0" hspace= "0" vspace= "0" style= "WIDTH:550PX;HEIGHT:116PX;" alt = "463c98cc4c12dec3ec87f9c9d4550fa8.png"/>

Can see, RM this command directly use, is unable to delete the directory, can only delete files, but although the error, can delete the file has been deleted ~ ~

650) this.width=650; "src=" Https://s5.51cto.com/oss/201710/28/e449d0a17e666434c9b0cf566caa6c9e.png "title=" Qq20171028162227.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:71px; "alt=" E449d0a17e666434c9b0cf566caa6c9e.png "/>

Other normal files have been deleted, leaving only one directory. (Note that the file after the format of this command can be specified more than one, and the format is followed by the "..." sign, indicating that multiple can be specified)

So, since RM can not delete the directory, why the small said it can delete directories or files, the ability to delete the directory is dependent on the option to complete, plus the option to delete the directory

-r: Delete directory and its contents

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/08873baf1a8e3851fe32ccf653a51181.png "title=" Qq20171028162832.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:85px; "alt=" 08873baf1a8e3851fe32ccf653a51181.png "/>

You can see that the directory was deleted successfully. The-r option allows you to delete all content in the directory and directory, so you can create a directory here, create a file under this directory, and view the directory structure with the tree command

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/bdfc4175efe4b263d4f739dbb36c5bde.png "title=" Qq20171028163024.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:170px; "alt = "Bdfc4175efe4b263d4f739dbb36c5bde.png"/>

Let's delete the little part.

650) this.width=650; "src=" Https://s4.51cto.com/oss/201710/28/a3b37c4f6c1fa9770319238fc4dea71d.png "title=" Qq20171028165510.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:75px; "alt=" A3b37c4f6c1fa9770319238fc4dea71d.png "/>

Look, the files under the directory and this directory are completely deleted. However, this command is very dangerous oh ~ ~ Delete the file when even the hint is not, in case small hand shake, mistakenly deleted how to do!

Don't worry about it ~ ~ This command has an option, when we delete the file will prompt us whether to delete, ah, really a friendly command ~ ~

-I: Interactive delete

Small series again to create a file, with the-i option to delete, test

650) this.width=650; "src=" Https://s3.51cto.com/oss/201710/28/02506c5dc0f036279f36823b74c43b5f.png "title=" Qq20171028165919.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:82px; "alt=" 02506c5dc0f036279f36823b74c43b5f.png "/>

After using the-i option, delete the file will prompt for deletion, enter Y to delete, if the input n is not deleted

650) this.width=650; "src=" Https://s2.51cto.com/oss/201710/28/a950c0e29ac43898af90d3a32195062d.png "title=" Qq20171028170033.png "width=" 550 "height=" 98 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:98px; "alt=" A950c0e29ac43898af90d3a32195062d.png "/>

Input n is not deleted.

However, every time you have to input-I good trouble ... Hum, do not worry, the students do not need to enter the-I option, because the system defaults to the Rm-i set to an alias, small part here just alias to delete, students can look at the alias, now small add alias, look at

650) this.width=650; "src=" Https://s2.51cto.com/oss/201710/28/64268c1e3345cb8d284d790d3851fa8f.png "title=" Qq20171028173734.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:550px;height:50px; "alt=" 64268c1e3345cb8d284d790d3851fa8f.png "/>

Students should be the default has this alias ~ ~ So don't worry

In addition, sometimes we are determined to delete a file, we feel the need to enter Y too troublesome, can be forced to delete ~

-F: Force delete

650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/28/1cf3378d90d8b353823a8e2e1fec30af.png "title=" Qq20171028174056.png "width=" 550 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:550PX;HEIGHT:112PX; "alt = "1cf3378d90d8b353823a8e2e1fec30af.png"/>

This command can delete various files Oh ~ ~ So, this command is very dangerous ~ ~ ~


Alas?? Small series of temporary suddenly have things, so this chapter first to here ~ ~ Sorry classmates, small make up the ~ ~ ~ because of the teacher to go, so to eat farewell rice ~ ~ ~ ~ ~ ~ ~

650) this.width=650; "src=" Https://s5.51cto.com/oss/201710/28/67dee7e2cc37ce2656d4366d0276c2ea.jpg "title=" (_t@~ sn%vgd3$}x) 0d]%gry.jpg "alt=" 67dee7e2cc37ce2656d4366d0276c2ea.jpg "/>

The END

This article is from the "13125850" blog, please be sure to keep this source http://13135850.blog.51cto.com/13125850/1977060

The zero-based Linux 15th chapter

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.