|
Previously seen words: Linux is reflected in the level quickly locate files ~~~ Perhaps these words exaggerated
But because everything is a file on Linux, whatever we want to do can be done by editing the file, such as server configuration, maintenance, and everything that we are dealing with the file ~ * ~ *
Let me tell you how to quickly find a file
if
Find the script file (executable files) which filename
Find a binary file (executable file) whereis -b filename
Find a specific file whereis filename (use a database to find)
Part of the filename locate the file (use a database lookup)
The above mentioned use of the database search, said database is a computer that you have all the files, is not very clear
That is, the file / var / lib / mlocate
When you can not remember the full name of the file using locate; of course you can also use the Find command together with a wildcard *
Such as finding files yum.conf
whereis yum. *
The screen output prefix yum. Files
Here I introduce a powerful command, but time-consuming, it time-consuming it? Because it is hard to find a direct
We have to know the contents of the hard disk to remove the memory go
It powerful? Look down
find / etc -mtime 3 What does it mean? Is the changed files to find out three days before the day
Its usefulness can be big, such as we had in November 11, 2014 has been configured server, we want to see that look in three days
Modified files, we love each other directly, type find / etc -mtime 3 terminal
find / boot -newer /boot/gurb.conf
Than /boot/gurb.conf also find the new file under the / boot directory
Find the root of the user's files belong fuchao
find / home -user fuchao
Find system files that do not belong to anyone (ps: this bit mean ~ ~ ~)
find / -nouser
Find files with special permissions
find / -perm +7000 --- s - s - t
find / -perm +600 |
|
|
|