:: Re: [DNG] Using find to find all oc…
Top Pagina
Delete this message
Reply to this message
Auteur: Ludovic Bellière
Datum:  
Aan: terryc
CC: dng
Onderwerp: Re: [DNG] Using find to find all occurences of a file(text string) in a tree.
Hello terry.

The man page gives you more than what you wrote. You have [expression], which is
a complex part. If you scroll down a little, you'll read a section named
*Expression* which details what goes in there. I encourage you to read it at
least partially, as it may help you refine your command.

Summarily, for your request, to find a file named a specific way, use:

    find /media/raid0/file -type f -iname '*Characters.ext'


You can delete them automatically by appending `-delete' to the command. Make
sure of what you find before deleting!

You can find empty files by using the `-empty' test. You can test for creation
time with `-mtime'. For example, you can find files older than 60 days by using
`-mtime +60'.

Hope it helps.

Cheers,
                 Ludovic



On Fri, 08 Nov 2024, terryc wrote:

>Hopefully just suffering brain fade here
>man find basically give
>
>find [starting point] [expression]
>
>is taken as two starting points.
>
>Example find /media/raid0/file /proc
>results in dumping everyfile under /media/raid0/file then /proc
>
>History. a quick and dirty backup system was set up to basically suck
>all the systems on the LAN without compression into /m/r/f/system/date/
>and that filesystem/hardware is getting very crowded and thoughts are
>to remove certain non-critical subdirectories or move the critical
>ones.
>
>T.I.A.
>terryc
>