In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is mainly for everyone to analyze the linux directory how to query the relevant knowledge points, the content is detailed and easy to understand, the operation details are reasonable, with certain reference value. If you are interested, you may wish to follow Xiao Bian to have a look. Let's follow Xiao Bian to learn more about "how to query Linux directory".
Methods: 1. Use pwd command to view the current directory, the syntax is "pwd [--help][--version]";2. Use find command to query the specified directory, the syntax is "find path -option [-print] [-exec -ok command]".
Operating environment: Linux 7.3 system, Dell G3 computer.
How to search Linux directory
Open the shell connection tool, connect to the server, pwd view the current directory, generally come in by default in the home directory ~ under:
Switch to the home directory by command: cd /, then pwd to view the current directory, and ls to view files and directories in the current directory
If we want to find an nginx configuration file nginx.conf, we can find it by using the find command: find . -name 'nginx.conf'
In the order above. Indicates the current directory. If we want to specify a directory to look up without switching directories, we can find it by: find directory-name 'nginx.conf':
If we don't know the exact name of the file but vaguely remember a few key words, then we can search through fuzzy matching: find directory-name '*nginx*' Find:
If we remember a limited number of file names and find too many files, but we remember the contents of some files, then we can filter the contents of the files through the pipe command: find directory-name '*nginx*'| xargs grep 'content', you can find all files with.conf results and location content as follows
If we don't remember anything, just vaguely remember when the file was created, we can also find it by looking at the file creation time.
find command is a powerful search command, the above only introduced by file name, file content and file modification time to find, and we can also by file permissions, file size, file users and so on to find information
About "linux how to query the directory" on the introduction to this, more related content can be searched for previous articles, I hope to help you answer questions, please support the site!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.