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

Summary of File-related commands commonly used under Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains the "summary of commonly used file-related commands under Linux", the content of the explanation is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "Linux commonly used file-related command summary" bar!

Displays the size of each file in the current directory

The code is as follows:

Ll-h

(as opposed to ls-lh)

Displays the total file size of each folder under the current directory

The code is as follows:

Ls | xargs du-sh

Current server space usage

The code is as follows:

Df-h

Total size of all files under the current folder

The code is as follows:

Du-smh *

View Fil

The code is as follows:

Cat 1.txt | more

Tail-n 10 1.txt | grep uuid

Head-n 10 1.txt

File transfer

The code is as follows:

Cp a.txt / tmp/

Cp a.txt / tmp/b.txt

Mv a.txt / tmp/

Scp a.txt username@10.20.134.199:/home/username/

Decompression of .tar.gz files

The code is as follows:

Tar zxvf test.tar.gz

Decompression of .tar.bz2 files

The code is as follows:

Bzip2-cd test.tar.bz2 > / tmp/test.txt

Thank you for your reading, the above is the "summary of commonly used file-related commands under Linux". After the study of this article, I believe you have a deeper understanding of the problem of summarizing the commonly used file-related 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

Servers

Wechat

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

12
Report