[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find command



Hi,

On 31-10-2022 18:12, Samuel Thibault wrote:
K0LNY_Glenn, le lun. 31 oct. 2022 12:05:57 -0500, a ecrit:
Originally, before searching on-line, I tried:
find ~/ -type f -name *.log >  find.txt

You want this, but rather find ~/ (which will only look in your home), you
want find /

Also, if you the directory where you execute that command has a .log file, you may find that the *.log is expended by shell before given to find.

So, when working with wildcards, it's safer to use quotes:

find ~/ -type f -name '*.log' >  find.txt
or
find / -type f -name '*.log' >  find.txt

Paul

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: