Sponsored Content
Full Discussion: File search in the directory
Top Forums UNIX for Dummies Questions & Answers File search in the directory Post 302397801 by thillai_selvan on Tuesday 23rd of February 2010 05:37:43 AM
Old 02-23-2010
Using ls -l | grep "^-" .

This can be used to list only the files under the directory.
In the ls -l's output if it begins with - character then it will be a file. If it begins with d then it will
be a directory.

Last edited by thillai_selvan; 02-23-2010 at 06:43 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to search content of file with timestamps in the directory

hello, i want to make a script to search the file contents in my home directory by a given date and output me the line that has the date... (10 Replies)
Discussion started by: psychobeauty
10 Replies

2. UNIX for Dummies Questions & Answers

Linux shortcutkey to search specific file from a list of directory?!

Hi, I'm the new user of linux/unix. Can I ask that anybody know how to use the linux/unix shortcut key to search a specific file from a list of directory? For example, I know the file name that I want to search. But I forget which directory or location is my desired file put.Got any shortcut... (7 Replies)
Discussion started by: patrick87
7 Replies

3. Shell Programming and Scripting

Search for a file in specific directory

I have to search a file in a prticular directory. filename will be passed through command line. The directory may contain subdirectory. i.e. suppose directory in /u03/appl (it can hard coded in script). This directory may contain subdirectory. $ scriptname.sh filename output should be... (2 Replies)
Discussion started by: jadoo_c2
2 Replies

4. Shell Programming and Scripting

How to search/replace a directory path in a file using perl

Hello All, Here is what I am trying to do and maybe you guys can point me in the right direction. I have a file that contains the following string(s): WARNING: </d1/test/program1> did not find item1 WARNING: </d1/test/program1> item1 does not exist WARNING: </d1/test/program2> item1 failed... (1 Reply)
Discussion started by: maxshop
1 Replies

5. UNIX for Dummies Questions & Answers

How to search directory for specific file?

I am new to Unix scripting and would like some help. Here is my scenario: 1) I have a text files that contains two fields: file name and retention period in months: File1 36 file2 24 File3 12 2) The directory I am searching contains sequential files. 3) I need to be able to take the file name... (10 Replies)
Discussion started by: Mustafa19804
10 Replies

6. Shell Programming and Scripting

Change to directory and search some file in that directory in single command

I am trying to do the following task : export ENV=aaa export ENV_PATH=$(cd /apps | ls | grep $ENV) However, it's not working. What's the way to change to directory and search some file in that directory in single command Please help. (2 Replies)
Discussion started by: saurau
2 Replies

7. UNIX for Dummies Questions & Answers

How to search for a file having a particular character in a particular place in a directory.?

Hi Guys, I want to search for a specific file in a directory which have a "b" letter as the 3rd character in the name of the file. For Example : /abc/efg/ldbjfblkj.sh /abc/efg/erublkd.sh /abc/efg/eibueora.sh /abc/efg/kfvnmnb.sh Since we have 2 files with "b" as a 3rd character in... (5 Replies)
Discussion started by: Pramod_009
5 Replies

8. Shell Programming and Scripting

Search for a file in all directories and place the file in that directory

Hi All, Daily I am getting the updated file. I have to search for this file in all directories and sub directories. If the file existed in a particular directory then move this updated file to that particular directory. If the file is not existed in any of the directories then place this... (4 Replies)
Discussion started by: ROCK_PLSQL
4 Replies

9. Shell Programming and Scripting

Script to search every file in a directory and print last few lines

Hi everyone, I need to write a script to search a directory, output the name of a file to an ouput file and print the last few lines of the files to the output file such that I would have something like this: FILE1: LINE LINE LINE FILE2: LINE LINE LINE FILE3: LINE LINE LINE... (2 Replies)
Discussion started by: mojoman
2 Replies

10. UNIX for Beginners Questions & Answers

Search directory for string and print file name

Good Evening Folks - I have a need to search a specific directory and ALL sub-directories for the following string: Data Load UpdatedIf this string is found, I need to print content from the line directory above it between symbols, as well as the file name where it is found. Here is a... (1 Reply)
Discussion started by: SIMMS7400
1 Replies
Publican::CreateBrand(3pm)				User Contributed Perl Documentation				Publican::CreateBrand(3pm)

NAME
Publican::CreateBrand - A module for generating new brand boilerplate. VERSION
This document describes Publican::CreateBrand version 0.1 SYNOPSIS
use Publican::CreateBrand; my $creator = Publican::CreateBrand->new({name => 'foo'}); $creator->create(); DESCRIPTION
Creates a new Brand for use with the publican package INTERFACE
new Create a Publican object set. Parameters: name Brand Name (Required) create Create all the required files. xml_files Create XML files. conf_files Create configuration files. images Create images dir and all the default images in svg and png format. default_images Generate images with default text in SVG and PNG formats. DIAGNOSTICS
"unknown args %s" All subs with named parameters will return this error when unexpected named arguments are provided. "%s is a required parameter" Any sub with a mandatory parameter will return this error if the parameter is undef. ""Can't create brand, directory %s exists!" When creating a Brand a directory is created with the same name as the brand. If a directory with that name is in the current directory the creation will fail. "Invalid language supplied: %s" The language supplied is not a valid language. "Can't create directory: %s" "Could not open %s for output!" "Can't write file" "Can't open SVG file %s" CONFIGURATION AND ENVIRONMENT
Publican::CreateBrand requires no configuration files or environment variables. DEPENDENCIES
Carp version Config::Simple File::Path File::pushd DateTime Image::Magick Publican Term::ANSIColor INCOMPATIBILITIES
None reported. BUGS AND LIMITATIONS
None reported. Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&amp;component=publican>. AUTHOR
Jeff Fearn "<jfearn@redhat.com>" perl v5.14.2 2012-06-18 Publican::CreateBrand(3pm)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy