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

The method of finding File location by linux

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

Share

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

In this issue, the editor will bring you the method of finding the location of files on linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

You can use the find command to find files under linux

For example:

Find /-name tnsnames.ora

Found:

/ opt/app/oracle/product/10.2/network/admin/tnsnames.ora/opt/app/oracle/product/10.2/network/admin/samples/tnsnames.ora

Error-free finding techniques:

In Linux systems, the "find" command is available to most system users and is not exclusive to ROOT system administrators. However, the average user can also encounter such a problem when using the "find" command, that is, the system administrator ROOT in the Linux system can set some file directories to disable access mode. In this way, ordinary users do not have the permission to query these directories or files with the "find" command. When the average user uses the "find" command to query these file directories, the words "Permissiondenied." (forbidden) often appear. The system will not be able to query the file you want. To avoid such errors, we can try to find the file by transferring the error prompt, such as typing:

Find /-name access_log 2 > / dev/null

Find the method based on some file names:

For example, if we know that a file contains the letters srm, it is possible to find all the files in the system that contain these three letters. Enter:

Find / etc-name'* srm*'

Query method according to the characteristics of the file:

Find /-amin-10 # find files accessed in the last 10 minutes in the system find /-atime-2 # find files accessed in the last 48 hours in the system find /-empty # find empty files or folders in the system find /-groupcat # find files belonging to groupcat in the system find /-mmin-5 # find files modified in the last 5 minutes in the system Find /-mtime-1 # find files modified in the last 24 hours in the system find /-nouser # find files belonging to invalid users in the system find /-user fred # find files belonging to FRED in the system above is the way to find the location of files in linux shared by Xiaobian If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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