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

How to use basic commands in linux

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

Share

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

This article is about how to use basic commands in linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1.xargs is commonly used

Xargs-L1-P5-I

Line, thread,-I naming

2.wait wait

Wait for all the processes in the main script to finish before continuing to run

Function await () {for pid in $(jobs-p) do wait $pid | | exit 1 done} 3. View the catalog

Check the du of the directory size (how much is used)

Du-sh directory occupancy size

Total capacity of df-h used

4.shell gets the difference (intersection and union) of two files.

The best sort a b b | uniq-u to find the intersection

Intersection

The default output of the comm command is three columns, the first column is Amurb (in A but not in B), the second column is BMY A, and the third column is A to B. -1 means that the first column is not displayed, and so on.

Comm-12 A.txt B.txt or cat a b | sort | uniq-d > c # c is an intersect b intersection

If An and B are out of order, you can use the following command

Comm

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: 240

*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