find warning Unix filenames usually dont contain slashes though pathnames do That means that -name ‘usrlocalx-uix-ui’ will probably evaluate to false all the time on this system You might find the -
This warning message is indicating that the use of slashes in the -name parameter of the find command is not appropriate.
If you want to find a file or directory named '/usr/local/x-ui/x-ui', you should use the -wholename parameter instead. Here's an example:
find / -wholename '/usr/local/x-ui/x-ui'
Alternatively, you can use the -samefile parameter if you are looking for a file with the same inode as '/usr/local/x-ui/x-ui':
find / -samefile '/usr/local/x-ui/x-ui'
If you are using GNU grep, you can pipe the output of find to grep using the -print0 option and search for the exact match using -FzZ:
find / -print0 | grep -FzZ '/usr/local/x-ui/x-ui'
Remember to replace / with the appropriate directory if you are searching in a specific location
原文地址: https://www.cveoy.top/t/topic/ixpi 著作权归作者所有。请勿转载和采集!