bug-findutils
[Top][All Lists]
Advanced

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

Re: Fwd: help us to resolve this command


From: Kamil Dudka
Subject: Re: Fwd: help us to resolve this command
Date: Fri, 11 Aug 2017 15:51:52 +0200
User-agent: KMail/4.14.10 (Linux/4.9.34-gentoo; KDE/4.14.32; x86_64; ; )

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



reply via email to

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