bug-findutils
[Top][All Lists]
Advanced

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

Re: bug-findutils Digest, Vol 173, Issue 2


From: Aman ulla
Subject: Re: bug-findutils Digest, Vol 173, Issue 2
Date: Sat, 12 Aug 2017 11:05:30 +0530

Thanks for your reply.

but,still its showing below error..  Kindly help us to resolve..

$find /user/home/ -mindepth 1 -type f -not -name '.*' -delete && find
/user/home/ -type d -not \ (-name '.*' -or -name 'Desktop' -or -name
'thinclient_drives' \) -delete
find: paths must precede expression: (-name
Usage: find [-H] [-L] [-P] [-O level] [-D
help|tree|search|stat|rates|opt|exec] [path...] [expression]

Brief details:

we want to remove all files except hidden files in user's home dir.
and, want to delete all dir except hidden dir, Desktop dir and
thinclient_drives dir.
we are planning to run this cmd as cron script,which will do scheduled
delete of newly created above mentioned category files and dir .

if, any other cmd syntex willl do the same, kinldy tell us to get these results.


Thanks in Advance.







On Fri, Aug 11, 2017 at 9:30 PM,  <address@hidden> wrote:
> Send bug-findutils mailing list submissions to
>         address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.gnu.org/mailman/listinfo/bug-findutils
> or, via email, send a message with subject or body 'help' to
>         address@hidden
>
> You can reach the person managing the list at
>         address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of bug-findutils digest..."
>
>
> Today's Topics:
>
>    1. Fwd: help us to resolve this command (Aman ulla)
>    2. Re: Fwd: help us to resolve this command (Kamil Dudka)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 11 Aug 2017 16:17:30 +0530
> From: Aman ulla <address@hidden>
> To: address@hidden
> Subject: Fwd: help us to resolve this command
> Message-ID:
>         <address@hidden>
> Content-Type: text/plain; charset="UTF-8"
>
> how can i run this command in our centos 7 server to get results..?
>
> # find /root/home/ -mindepth 1 -type f -not -name '.*' -delete && find
> /root/home/ -type d -not \(\-name '.*' -or -name 'Desktop' -or -name
> 'thinclient_drives' \) -delete
>
> this command gives this error.
>
> find: paths must precede expression: (-name
> Usage: find [-H] [-L] [-P] [-Olevel] [-D
> help|tree|search|stat|rates|opt|exec] [path...] [expression]
>
> kindly help us to resolve this..
>
>
> Thanks in Advance.
>
>
>
>
>
> --
>                              " Don't pollute it,good planets are hard to find 
> "
>
>                              *-*-*   Unity is Strength   *-*-*
>
> Regards,
> S.Amanulla
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 11 Aug 2017 15:51:52 +0200
> From: Kamil Dudka <address@hidden>
> To: Aman ulla <address@hidden>
> Cc: address@hidden
> Subject: Re: Fwd: help us to resolve this command
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> On Friday, August 11, 2017 16:17:30 Aman ulla wrote:
>> how can i run this command in our centos 7 server to get results..?
>
> It depends on which results you want to get.  My suggestion is not to run
> commands as root unless you really understand what they do ;-)
>
>> # find /root/home/ -mindepth 1 -type f -not -name '.*' -delete && find
>> /root/home/ -type d -not \(\-name '.*' -or -name 'Desktop' -or -name
>> 'thinclient_drives' \) -delete
>>
>> this command gives this error.
>>
>> find: paths must precede expression: (-name
>
> The error message sounds clear to me.  You likely want to spell \(\-name
> as \( -name so that ( ... ) is recognized as operator, instead of badly
> positioned path.
>
> Note that the back slashes are consumed by your shell, not by find itself.
>
> Kamil
>
>> Usage: find [-H] [-L] [-P] [-Olevel] [-D
>> help|tree|search|stat|rates|opt|exec] [path...] [expression]
>>
>> kindly help us to resolve this..
>>
>>
>> Thanks in Advance.
>>
>>
>>
>>
>>
>> --
>>                              " Don't pollute it,good planets are hard to
>> find "
>>
>>                              *-*-*   Unity is Strength   *-*-*
>>
>> Regards,
>> S.Amanulla
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> bug-findutils mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-findutils
>
>
> ------------------------------
>
> End of bug-findutils Digest, Vol 173, Issue 2
> *********************************************



-- 
                             " Don't pollute it,good planets are hard to find "

                             *-*-*   Unity is Strength   *-*-*

Regards,
S.Amanulla



reply via email to

[Prev in Thread] Current Thread [Next in Thread]