Re: Want some info about find command



On Apr 3, 4:39 am, "Jitu" <jitendra.mis...@xxxxxxxxx> wrote:
Hi All,

I have little idea about "find" command. find searches for files/
folders recursively as all we know.
But my question is "is there any way by which we can restrict the
recursive search"??? Can we find for the files in the current
directory.

Thanks in advance guys..

I know i will get some answers in few moments.. :-)

Let's say you're in the directory you want to find the file in the
directory you are in...
Why wouldn't you just ls -al filename ?

I use this find if you're looking for the file called 'data' :

find / -name data -print

That will start at root and look everywhere.

If you use:

find . -name -print

It will only look in the parent and childreen of the directory you are
in.

Hope this helps.
Tom


.



Relevant Pages

  • Re: Un-erasable folder
    ... >>> enclose the entire filename (including the path if you are not in its ... >>> parent directory). ... >> extension, so the use of one or more periods in a filename can get very ... Like the former deltree command. ...
    (microsoft.public.windows.file_system)
  • [SLE] Undeletable files/directory
    ... /data1 which I cannot delete even as root. ... Trying to delete them from the command line using rm <filename> gives ... Short of reformatting the partition, how may I delete these files? ...
    (SuSE)
  • Re: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
    (comp.sys.mac.system)
  • Re: [opensuse] su - -c $command user ???
    ... I'd like to calculate a command-string as root and pass it with su ... into the context of a unprivileged user to run the command not as ... Basically I need to know $d after the daemonuser created and filled ... Note the echo isn't really going to be a fully valuable ...
    (SuSE)
  • Re: System-users and-groups?
    ... bin shouldn't do so much. ... was root and bin... ... Although the daemon user/group are ... as that user runs that command. ...
    (alt.linux)