Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common Linux commands of Docker

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail what are the common Linux commands in Docker, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

View all the files under the path ls

New folder mkdir XXX

Edit the file vim XXX

Delete file (mandatory) rm-f XXX

Switch directory cd XXX

View the contents of the file cat XXX

It doesn't make sense to talk about the concept, let's have a real scene. Now I'm going to create a new folder ceshi, and then there's a ceshi.txt,txt with hello linux in it.

Let's take a look at what files are under the root directory, as shown in the figure.

Now let's create a new folder and check to see if it has been added successfully. As shown in the figure, we can see that the ceshi file has been successfully added through the ls command.

We now go to the ceshi folder, as shown in the figure, we can see that the directory has an extra layer of ceshi.

We now add ceshi.txt, such as the figure after the implementation of vim ceshi.txt, will automatically enter his editing page, we write hello linux on the editing page, we found that the last line of figure 2 appeared the "- insert -" command, which shows that currently in editing mode, we want to exit editing mode, just press esc, and then exit the editing mode.

After exiting the editing mode, we directly write ": wq", which means to exit and save what we have just written, as shown in the picture, and then enter to return to our previous main page.

Now let's take a look at whether we have written the content in ceshi.txt, as shown in the picture, which means that the content is written correctly.

If we want to delete the ceshi.txt, just write rm ceshi.txt, and then it will be displayed, as shown in the figure. If you want to delete without prompting, just write rm-f ceshi.txt by default (this is often said to delete the database to run away).

Finally, let's take a look at the file ceshi.txt in the ceshi folder. The answer is yes, there is no such file.

This is the end of sharing the common Linux commands in Docker. I hope the above can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report