Please let me know because the behavior of the following commands is too different.
For "y" *, there is one file that starts with y, so one file is certainly searched.
If i do "y *", a large number of files containing y under the directory will be searched in a row.
$find ./ -name "y" * $find ./ -name "y *"
I don't really understand the difference, but can anyone please tell me?
Answer # 1
of the find command
-nameFor the file name pattern specified in the option, specify "the file name you want find to find in the directory to be searched", isn't it?
"y" *If you specify, the shell will replace the "filename starting with y" in the current directory when you run find, and then find will be run.
For example, if there is a file named "yes" in the current directory, it will search for a file with the file name "yes" in the searched directory.
Note: If you are lucky enough that no file matching "y" * exists in the current directory (because * is not expanded), the result will be
"y *"Will be the same as. Also, if multiple files match, multiple filenames will be interrupted by the find argument, which may result in a syntax error or unexpected results.
On the other hand,
"y *"If you specify, "y *" is passed to find as it is and find is executed without replacement by the shell.
Then, in the search destination directory, the file with the file name matching "y *" will be searched.
Conclusion: with find
-nameBe sure to quote when using.
- ruby - how to use the delete_if method
- flask - how to use the command prompt
- php - how to use the realpath method
- how to use the as clause in mysql
- c - how to use the quadruple loop
- python - how to use the pytest mock
- python - i don't know how to use ipv6 udp jumbogram
- c# - how to use unity namespace
- how to use java try-catch statement
- python - how to use django form
- python - how to specify the html path
- php - i don't know how to use "" rules
- how to change the url of git submodule at once
- php - i don't know how to use indeed's api
- html - how to specify the tag width
- linux - how to set environment variables in fish
- c# - how to use unity initialization code
- how to use fscanf and what to put in () of rewind()?
- linux : Changing the default Ubuntu kernel on a remote server
- python : when installing dlib gives an error
- Doesn't upload file to php virtual server
- linux : Accidentally installed Ubuntu bootloader over Windows 10 bootloader
- linux : Transferring ssh keys over FTP to a network device
- linux : transmission-daemon when calling the script
- linux : Installing cmake on Ubuntu 19.04
- PHP does not read code with
- linux : How do I specify the path to my editor in select-editor?
- linux : Gnome-tweak-tool is not installed