Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Search for files in multiple directories Post 302094277 by Corona688 on Thursday 26th of October 2006 11:22:10 AM
Old 10-26-2006
If that will work, then so will the ls 2006*/ftp_server* I suggested in the first place. Your solution has the same caveat -- too many directories will exceed the maximum commandline length of your shell.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search directories for files with zero sizes to delete

Hi, I am trying to write a script that will use ls on a directory and list the files one at a time and their size. If the size is 0 i want it to ask me if I want to delete it (yes or no). If I say yes, I want it to delete but it won't know what the file name is just from running from the script.... (2 Replies)
Discussion started by: akeenabawa
2 Replies

2. UNIX for Dummies Questions & Answers

Multiple search in multiple directories

Hi, I am facing the below problem I have a list of number to be searched(around 1000) files resideing in multiple directories as i dont know where it resides in. for example search string is like (abc)123456 please help. very urgent Thanks a lot Uma (3 Replies)
Discussion started by: umapearl
3 Replies

3. UNIX for Dummies Questions & Answers

Loop through Sub Directories and search for set of files

I have the below directory in unix environment /home/bkup/daily: ls -lrt drwxrwx--x 2 user user 256 Jan 12 18:21 20110112/ drwxrwx--x 2 user user 256 Jan 13 17:06 20110113/ drwxrwx--x 2 user user 256 Jan 14 16:44 20110114/ drwxrwx--x 2 user user ... (2 Replies)
Discussion started by: prasannarajesh
2 Replies

4. Shell Programming and Scripting

FTP multiple files from multiple directories

I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure.. ./dir1/1/TRADE_LOG*.gz ./dir2/10/TRADE_LOG*.gz ./dir11/12/TRADE_LOG*.gz ./dir12/13/TRADE_LOG*.gz when I do ftp uisng mput from the "." dir I am getting the below given error mput... (1 Reply)
Discussion started by: prasperl
1 Replies

5. UNIX for Advanced & Expert Users

word search in multiple directories

need a Command in UNIX which can find out a word from files in multiple directories e.g. /home contains multiple directories /home/d1 /home/d2 . . . . /home/dn under d1,d2...dn contains multiple files. I need to search a specific word in a files under these multiple... (1 Reply)
Discussion started by: jagkoth
1 Replies

6. Shell Programming and Scripting

How to access files from different directories and to perform search action in those files?

Hi, I want to access files from different directories (for example: /home/dir1/file1 , /home/dir2/file2 ...) Like this i have to access these files(file1, file2...). (3 Replies)
Discussion started by: bangarukannan
3 Replies

7. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

8. Shell Programming and Scripting

Recursive search for files and copy to new directories

So I have extremely limited experience with shell scripting and I was hoping someone could point out a few commands I need to use in order to pull this off with a shell script like BASH or whatnot (this is on OS X). I need to search out for filenames with account numbers in the name itself... (3 Replies)
Discussion started by: flyawaymike
3 Replies

9. Shell Programming and Scripting

Command to Search a FILE for a STRING in multiple DIRECTORIES

Hi, Can someone please help me with a Command to Search a FILE for a STRING in multiple DIRECTORIES. I am searching for the VIP in HTTPD.CONF in multiple httpd instances. I am using find ./ -name "httpd.conf" | xargs grep 10.22.0.141 cut -d: -f3- | cut -d ' ' -f4 | sort | uniq -c ... (1 Reply)
Discussion started by: crosairs
1 Replies

10. UNIX for Beginners Questions & Answers

How to use a grep search to search for a specific string within multiple directories?

Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried: grep -lr "this string" * but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
CPANPLUS(3)						User Contributed Perl Documentation					       CPANPLUS(3)

NAME
CPANPLUS - API & CLI access to the CPAN mirrors SYNOPSIS
### standard invocation from the command line $ cpanp $ cpanp -i Some::Module $ perl -MCPANPLUS -eshell $ perl -MCPANPLUS -e'fetch Some::Module' DESCRIPTION
The "CPANPLUS" library is an API to the "CPAN" mirrors and a collection of interactive shells, commandline programs, etc, that use this API. GUIDE TO DOCUMENTATION
GENERAL USAGE This is the document you are currently reading. It describes basic usage and background information. Its main purpose is to assist the user who wants to learn how to invoke CPANPLUS and install modules from the commandline and to point you to more indepth reading if required. API REFERENCE The "CPANPLUS" API is meant to let you programmatically interact with the "CPAN" mirrors. The documentation in CPANPLUS::Backend shows you how to create an object capable of interacting with those mirrors, letting you create & retrieve module objects. CPANPLUS::Module shows you how you can use these module objects to perform actions like installing and testing. The default shell, documented in CPANPLUS::Shell::Default is also scriptable. You can use its API to dispatch calls from your script to the CPANPLUS Shell. COMMANDLINE TOOLS
STARTING AN INTERACTIVE SHELL You can start an interactive shell by running either of the two following commands: $ cpanp $ perl -MCPANPLUS -eshell All commands available are listed in the interactive shells help menu. See "cpanp -h" or CPANPLUS::Shell::Default for instructions on using the default shell. CHOOSE A SHELL By running "cpanp" without arguments, you will start up the shell specified in your config, which defaults to CPANPLUS::Shell::Default. There are more shells available. "CPANPLUS" itself ships with an emulation shell called CPANPLUS::Shell::Classic that looks and feels just like the old "CPAN.pm" shell. You can start this shell by typing: $ perl -MCPANPLUS -e'shell Classic' Even more shells may be available from "CPAN". Note that if you have changed your default shell in your configuration, that shell will be used instead. If for some reason there was an error with your specified shell, you will be given the default shell. BUILDING PACKAGES "cpan2dist" is a commandline tool to convert any distribution from "CPAN" into a package in the format of your choice, like for example ".deb" or "FreeBSD ports". See "cpan2dist -h" for details. FUNCTIONS
For quick access to common commands, you may use this module, "CPANPLUS" rather than the full programmatic API situated in "CPANPLUS::Backend". This module offers the following functions: $bool = install( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz ) This function requires the full name of the module, which is case sensitive. The module name can also be provided as a fully qualified file name, beginning with a /, relative to the /authors/id directory on a CPAN mirror. It will download, extract and install the module. $where = fetch( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz ) Like install, fetch needs the full name of a module or the fully qualified file name, and is case sensitive. It will download the specified module to the current directory. $where = get( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz ) Get is provided as an alias for fetch for compatibility with CPAN.pm. shell() Shell starts the default CPAN shell. You can also start the shell by using the "cpanp" command, which will be installed in your perl bin. FAQ
For frequently asked questions and answers, please consult the "CPANPLUS::FAQ" manual. BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::FAQ, CPANPLUS::Backend, CPANPLUS::Module, cpanp, cpan2dist CONTACT INFORMATION
o Bug reporting: bug-cpanplus@rt.cpan.org o Questions & suggestions: bug-cpanplus@rt.cpan.org perl v5.16.3 2013-05-20 CPANPLUS(3)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy