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

File search and file management of Linux/unix command

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

Share

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

Search for executable files

which

Displays the complete path to an executable file

Find them in the order alias->$PATH

View the system's environment variables

whereis

Search for an executable tool and its associated configuration, help

slocate

locate or locate keywords

All files and directories with file names and paths containing key fields are displayed

slocate first makes the current directory structure into a database, and then searches for matching records in this database

find

find [path] [parameter] [expression]

Recursively searches for files from a specified path down

Support search by various criteria

Support for further command manipulation of files obtained by searching

Search by file type

II. Operation of found files

Syntax: find [path] [parameter] [expression] -exec directive {} \ ;

{} represents the file found

\No diversion

; indicates the end of this line of command

III. Common file operation instructions

wc counts lines, words and words of text

grep displays lines in a file that match keywords

sort sorts text in order and sends it to display

diff Report Text Difference Content

comp Report Text Difference Location

uniq removes duplicate lines from files

cut displays a column in a file

paste Splices text into columns

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