Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Find in file. Does this exist under UNIX? Post 96310 by scampsd on Thursday 19th of January 2006 08:52:33 AM
Old 01-19-2006
Find in file. Does this exist under UNIX?

Hello,
I have the following problem. I know there is a file somewhere on a UNIX machine that contains a string, but I don't know where.

With the "grep" command, I can look into a file but only if I'm located in the correct directory.

With the "find" command, I can search across directories but I cannot specify to search within the files for a certain string.

Does there exist a standard UNIX command for looking for a text within a file without knowing the directory in which the file is located?

Thanks
Dominique
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can Unix Co-Exist with Windows 9X on the same System?

Is it possible to install unix on a system which already runs windows 98? (2 Replies)
Discussion started by: ms73eb
2 Replies

2. Shell Programming and Scripting

how to find a file in UNIX without find command?

given a start directory,a filename,how to find it? (3 Replies)
Discussion started by: bluo
3 Replies

3. UNIX for Advanced & Expert Users

Does UNIX-Chmod in windows exist?

Is there an command in windows to chmod a file to 666 so that when I mount a NAS on solaris, the user can read/write/remove the file from unix server? Traditionally, we invoke ftp from unix to windows, get the file and remove it. With a NAS, can windows chmod the file 666 so that unix can edit... (2 Replies)
Discussion started by: izy100
2 Replies

4. Shell Programming and Scripting

Can I find wether a particular file exist and size greater than zero...help please

Can I find wether a particular file exist and size greater than zero in one line command. similar to this if && something in one if test .... e.g. if 1.) is it possible ? ... if yes how 2.) what would be the return type in case there is success or failure. I mean if both are... (4 Replies)
Discussion started by: guhas
4 Replies

5. UNIX for Dummies Questions & Answers

How to find if file exist in directory using *

Hi, I know how to use the test command ( ...) to find a single given name file. However, I have a case in which I have a directory with one file and one sub-directory. I know that the file starts with "fub". The command doesn't work if i call the file "fub*" as it doesn't understand I meant a... (2 Replies)
Discussion started by: buj
2 Replies

6. Shell Programming and Scripting

Find out whether files exist.

I have the following data stored in a file. 1 /home/file13 /home/file2 2 /home/file41 /home/file654 3 /home/file61 /home/file45 4 /home/file81 /home/file43 ... I want to print the first column provided the files represented by the second and third column exist. How to do that? (3 Replies)
Discussion started by: kevintse
3 Replies

7. Shell Programming and Scripting

find + move if destination path does not exist

hi frnds, please help ... what will happen with below command if destination path does not exist on the system.... find /var/adm/cft* -mtime +1 -exec mv {} /global/ \ in unix its remove all my files from the system from soruce file ... how is it possbile (1 Reply)
Discussion started by: dodasajan
1 Replies

8. Shell Programming and Scripting

Find if a directory exist from a list of the path

Hello, i want to script on sh to check from a path if the directory exist and isn't empty. I explain: path is : /aaa/bbb/ccc/ccc_name/ddd/ Where the cccc_name is in a list, so i think it's $1 My command find -name /aaa/bbb/ccc/$1/ddd/ didn't work because my $1 is the same and not... (5 Replies)
Discussion started by: steiner
5 Replies

9. Shell Programming and Scripting

Find command when there exist many files

I want to run find and wondering if it struggles when there are many files. I have tried and does not seem to complain. Is this correct? (8 Replies)
Discussion started by: kristinu
8 Replies

10. UNIX for Advanced & Expert Users

Isql and If Exist syntax error in UNIX script

Hello Everyone, Coming again for your help to solve the below error: In a script, i had created a temp table (Temp_table) and loaded the data in it using bcp command (performed successfully) and I wanted to move it to the preferred table (called Main_table) for further use. hence I have added... (7 Replies)
Discussion started by: Suresh
7 Replies
Net::LDAPI(3)						User Contributed Perl Documentation					     Net::LDAPI(3)

NAME
Net::LDAPI - use LDAP over a UNIX domain socket SYNOPSIS
use Net::LDAPI; $ldapi = Net::LDAPI->new('/var/run/ldapi'); # alternate way use Net::LDAP; $ldapi = Net::LDAP->new('ldapi://'); DESCRIPTION
Communicate using the LDAP protocol to a directory server using a UNIX domain socket. This mechanism is non-standard, UNIX-specific and not widely supported. All the normal "Net::LDAP" methods can be used with a "Net::LDAPI" object; see Net::LDAP for details. CONSTRUCTOR
new ( [SOCKPATH] ) Create a new connection. SOCKPATH can optionally be specified, to specify the location of the UNIX domain socket to connect to. If SOCKPATH is not given, the environment variable "LDAPI_SOCK" is evaluated, and if that does not exist, the value "/var/run/ldapi" is used. See "new" in Net::LDAP for further details. SEE ALSO
Net::LDAP, IO::Socket::UNIX BUGS
None yet. AUTHOR
Derrik Pates <dpates@dsdk12.net> COPYRIGHT
Copyright (c) 2003-2004, Derrik Pates and Graham Barr. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-07-21 Net::LDAPI(3)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy