Sponsored Content
Top Forums Shell Programming and Scripting Search for a particular file in the server Post 302266082 by joeyg on Tuesday 9th of December 2008 10:58:36 AM
Old 12-09-2008
Tools Format(s)

Code:
find . -name abc.lvc.* -print

Will find files from you current directory and all sub-directories beneath it.

Code:
find / -name abc.lvc.* -print

Will search the entire system for the files. Will take a while, and you may see errors that you do not have access to view directories.

Last edited by joeyg; 12-09-2008 at 12:06 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

use ind command to search files on differnet server

Hi, I am writing script to search the directories on different server. I have 3 servers. eg. ser1, ser2, ser2 find <absolute_path>-type d -user <user_name> -ctime +5 -exec ls -ltd {} \; can someone please suggest me some way how can i use find command for this. i have ssh connectivity... (1 Reply)
Discussion started by: vikash_k
1 Replies

2. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

3. Shell Programming and Scripting

Perl - use search keywords from array and search a file and print 3rd field when matched

Hi , I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code. my $current_value=12345; my @users=("bob","ben","tom","harry"); open DBLIST,"<","/var/tmp/DBinfo"; my @input = <DBLIST>; foreach (@users) { my... (11 Replies)
Discussion started by: chidori
11 Replies

4. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

5. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

6. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies

7. Shell Programming and Scripting

Retrieving the relevant search from search file in the main file

I have two files: file 1: hello.com neo.com,japan.com,example.com news.net xyz.com, telecom.net, highlands.net, software.com example2.com earth.net, abc.gov.uk file 2: neo.com example.com abc.gov.uk file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
Discussion started by: csim_mohan
7 Replies

8. UNIX for Dummies Questions & Answers

Search file and print everything except multiple search terms

I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
Discussion started by: seekryts15
3 Replies

9. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

10. Shell Programming and Scripting

How to search the multiple strings in app server.log?

Hi Team, Could you please suggest the below requirement. using the below server log, i just want only the order_id with combination of customer name , error code value as 5000111 & amount value using the shell script i tired using the command grep "error_code>50001111"... (6 Replies)
Discussion started by: venkat918
6 Replies
Tree::Simple::Visitor::CreateDirectoryTree(3pm) 	User Contributed Perl Documentation	   Tree::Simple::Visitor::CreateDirectoryTree(3pm)

NAME
Tree::Simple::Visitor::CreateDirectoryTree - A Visitor for create a set of directories and files from a Tree::Simple object SYNOPSIS
use Tree::Simple::Visitor::CreateDirectoryTree; # create a Tree::Simple object which # represents a directory heirarchy my $tree = Tree::Simple->new("www/") ->addChildren( Tree::Simple->new("conf/") ->addChildren( Tree::Simple->new("startup.pl"), Tree::Simple->new("httpd.conf") ), Tree::Simple->new("cgi-bin/"), Tree::Simple->new("ht_docs/"), Tree::Simple->new("logs/") ->addChildren( Tree::Simple->new("error.log"), Tree::Simple->new("access.log") ), ); # create an instance of our visitor my $visitor = Tree::Simple::Visitor::CreateDirectoryTree->new(); # pass the visitor to a Tree::Simple object $tree->accept($visitor); # the www/ directory now mirrors the structure of the tree DESCRIPTION
This visitor can be used to create a set of directories and files from a Tree::Simple object hierarchy. METHODS
new There are no arguments to the constructor the object will be in its default state. You can use the "setNodeFilter", "setFileHandler" and "setDirectoryHandler" methods to customize its behavior. setNodeFilter ($filter_function) This method accepts a CODE reference as its $filter_function argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are used to create the directory tree, it can be basically used as a node pre- processor. An example usage of this might be to enforce the 8.3 naming rules of DOS, or the 32 character limit of older macintoshes. setFileHandler ($file_handler) This method accepts a CODE reference as its $file_handler argument and throws an exception if it is not a CODE reference. This method can be used to create custom file creation behavior. The default behavior is to just create the file and nothing else, but by using this method it is possible to implement some other custom behavior, such as creating a file based on a template. The function is passed the full path of the file to be created (as built by File::Spec). setDirectoryHandler ($dir_handler) This method accepts a CODE reference as its $dir_handler argument and throws an exception if it is not a CODE reference. This method can be used to create custom directory creation behavior. The default behavior is to just create the directory and nothing else, but by using this method it is possible to implement some other custom behavior, such as creating a directory on a remote server. The function is passed the full path of the directory to be created (as built by File::Spec). visit ($tree) This is the method that is used by Tree::Simple's "accept" method. It can also be used on its own, it requires the $tree argument to be a Tree::Simple object (or derived from a Tree::Simple object), and will throw and exception otherwise. The tree is processed as follows: Any node which is not a leaf is considered a directory. Obviously since files themselves are leaf nodes, this makes sense that non-leaves will be directories. Any node (including leaf nodes) which ends in either the character "/" or "" is considered a directory. I think it is a pretty standard convention to have directory names ending in a separator. The separator itself is stripped off before the directory name is passed to File::Spec where the platform specific directory path is created. This means that it does not matter which one you use, it will be completely cross platform (at least as cross-platform as File::Spec is). All other nodes are considered to be files. BUGS
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it. CODE COVERAGE
See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more inforamtion. SEE ALSO
These Visitor classes are all subclasses of Tree::Simple::Visitor, which can be found in the Tree::Simple module, you should refer to that module for more information. AUTHOR
stevan little, <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-02-18 Tree::Simple::Visitor::CreateDirectoryTree(3pm)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy