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

Sorting out common commands under Linux

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

Share

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

This article mainly explains "the arrangement of common commands under Linux". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "sorting out common commands under Linux".

This article summarizes the commonly used Linux file operation instructions to prepare for the following hadoop cluster construction. Based on the principle that it is enough, the commands listed in this article only summarize their common usage. If you need further study, you can consult the relevant materials on the Internet.

Cd

Cd directory # changes to the directory directory, using either absolute or relative paths

Cd ~ # switch to the user's home directory

Cd.. # switch to the parent directory, the parent directory

Cd-# the directory where it was before you changed to this directory

Mkdir

Mkdir test# creates a test folder under the current directory

Mkdir-p test/a/b# recursively creates a test/a/b folder under the current directory

Ls

Ls # lists all non-hidden files in the current directory

Ls.. / # lists all non-hidden files in the parent directory

Ls-la lists all files in the current directory, including. Hidden file at the beginning

Ls directory# lists all non-hidden files under directoty. Directory can use absolute or relative paths.

Cp

Cp a.txt b.txt# copies the file a.txt, named b.txt

Rm

Rm file# deletes the file file under the current folder

Rm-rf test/# deletes the test folder under the current folder

Pwd

Pwd# to view the absolute path where it is currently located

Tar

Tar-zxvf file.tar.gz # decompress tar.gz package

Tar-xvf file.tar # decompress tar package

Vi

Vi file.txt# edits the file.txt file. If it does not exist, create one. You cannot edit it directly at this time.

Press I and the "INSERT" prompt appears before you can edit normally.

After editing, enter ": X" to save the changes and exit

After editing, enter ": Q!" Enter, indicating that the changes are not saved and exit

The process of using the vi command

Source

Source ~ / .zshrc # restart to make it effective after editing the configuration file

. / script

. / start-dfs.sh executes the start-dfs.sh script file

Java-version

Java-version# to view the current java version

Jps

Jps # View the process numbers of all current java processes

Thank you for your reading, the above is the content of "sorting out common commands under Linux". After the study of this article, I believe you have a deeper understanding of the problem of sorting out common commands under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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