Sponsored Content
Full Discussion: Recursive Find on file size
Top Forums UNIX for Dummies Questions & Answers Recursive Find on file size Post 302760879 by jim mcnamara on Thursday 24th of January 2013 05:10:54 PM
Old 01-24-2013
Some versions of find support extra values for files sizes this is generic
1953125 by 512 byte blocks = 1GB, this produces tow columns = directory name and filename

Code:
find /path -size +1953125 -print |
while read fname 
do
   echo "$(dirname $fname)    $(basename $fname)"
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find the file by size

Hi, Can somebody PLEASE help me. Suppose I want to find a file which has largest no of bytes in a particular directory, How do i do that. ls -s will give the size of Blocks. But I want the largest sized file and in bytes or KB OR MB. tHANKS IN advanvce. Bye Rooh :( (1 Reply)
Discussion started by: rooh
1 Replies

2. UNIX for Advanced & Expert Users

find file with date and recursive search for a text

Hey Guyz I have a requirement something like this.. a part of file name, date of modification of that file and a text is entered as input. like Date : 080206 (MMDDYY format.) filename : hotel_rates text : Jim now the file hotel_rates.ZZZ.123 (creation date is Aug 02 2006) should be... (10 Replies)
Discussion started by: rosh0623
10 Replies

3. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

4. Shell Programming and Scripting

find file size

My Question is ----------------- Assume you've a directory (i.e /home/test/) which contains n number of files, rename all the files which has byte count more than zero (0) with .bak extension. Write shell script to achieve this output, execute the same without using". / " in front of... (6 Replies)
Discussion started by: hgriva1
6 Replies

5. UNIX for Advanced & Expert Users

Find file size and date

Hi in my shell script I have to do this 1. there is a file called testing.txt in /home/report directory If the file size is 0(zero) and date is today's date, then I have to print "Successful" else "Failed". 2. There is a file called number.txt which will have text only one line like this... (10 Replies)
Discussion started by: gsusarla
10 Replies

6. Shell Programming and Scripting

How to find size of a file

Hi, I have to directory /usr/inbound ------------- 10900.txt 10889.txt 109290202.txt I need to create inbound directory and i need to know size of these files one by one if file size is zero i need to print message like "empty file" Please help me how to solve this thanks krish. (4 Replies)
Discussion started by: kittusri9
4 Replies

7. Shell Programming and Scripting

find a file and print its size

I have a directory, /local/test/ under this directory is many subdirectories, each subdir has about 70 files, the 70 files are always the same names. I want to print to the screen the size of fileabc.txt in each of the subdirectories. I cannot seem to work with pipe and splats * because there are... (3 Replies)
Discussion started by: ajp7701
3 Replies

8. Shell Programming and Scripting

find with file size and show the size

Hi All... is the below command be modified in sucha way that i can get the file size along with the name and path of the file the below command only gives me the file location which are more than 100000k...but I want the exact size of the file also.. find / -name "*.*" -size +100000k ... (3 Replies)
Discussion started by: rpraharaj84
3 Replies

9. Shell Programming and Scripting

How to find the latest file on Unix or Linux (recursive)

Hi all, I need to get the latest file. I have found this command "ls -lrt" that is great but not recursive. Can anyone help? Thanx by advance. (7 Replies)
Discussion started by: 1or2is3
7 Replies

10. Shell Programming and Scripting

Recursive find / grep within a file / count of a string

Hi All, This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance. For a project I need to do the following. 1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Discussion started by: Charlie6742
9 Replies
Pod::Find(3pm)						 Perl Programmers Reference Guide					    Pod::Find(3pm)

NAME
Pod::Find - find POD documents in directory trees SYNOPSIS
use Pod::Find qw(pod_find simplify_name); my %pods = pod_find({ -verbose => 1, -inc => 1 }); foreach(keys %pods) { print "found library POD `$pods{$_}' in $_ "; } print "podname=",simplify_name('a/b/c/mymodule.pod')," "; $location = pod_where( { -inc => 1 }, "Pod::Find" ); DESCRIPTION
Pod::Find provides a set of functions to locate POD files. Note that no function is exported by default to avoid pollution of your names- pace, so be sure to specify them in the use statement if you need them: use Pod::Find qw(pod_find); "pod_find( { %opts } , @directories )" The function pod_find searches for POD documents in a given set of files and/or directories. It returns a hash with the file names as keys and the POD name as value. The POD name is derived from the file name and its position in the directory tree. E.g. when searching in $HOME/perl5lib, the file $HOME/perl5lib/MyModule.pm would get the POD name MyModule, whereas $HOME/perl5lib/Myclass/Subclass.pm would be Myclass::Subclass. The name information can be used for POD translators. Only text files containing at least one valid POD command are found. A warning is printed if more than one POD file with the same POD name is found, e.g. CPAN.pm in different directories. This usually indi- cates duplicate occurrences of modules in the @INC search path. OPTIONS The first argument for pod_find may be a hash reference with options. The rest are either directories that are searched recursively or files. The POD names of files are the plain basenames with any Perl-like extension (.pm, .pl, .pod) stripped. "-verbose => 1" Print progress information while scanning. "-perl => 1" Apply Perl-specific heuristics to find the correct PODs. This includes stripping Perl-like extensions, omitting subdirectories that are numeric but do not match the current Perl interpreter's version id, suppressing site_perl as a module hierarchy name etc. "-script => 1" Search for PODs in the current Perl interpreter's installation scriptdir. This is taken from the local Config module. "-inc => 1" Search for PODs in the current Perl interpreter's @INC paths. This automatically considers paths specified in the "PERL5LIB" environ- ment as this is prepended to @INC by the Perl interpreter itself. "simplify_name( $str )" The function simplify_name is equivalent to basename, but also strips Perl-like extensions (.pm, .pl, .pod) and extensions like .bat, .cmd on Win32 and OS/2, or .com on VMS, respectively. "pod_where( { %opts }, $pod )" Returns the location of a pod document given a search directory and a module (e.g. "File::Find") or script (e.g. "perldoc") name. Options: "-inc => 1" Search @INC for the pod and also the "scriptdir" defined in the Config module. "-dirs => [ $dir1, $dir2, ... ]" Reference to an array of search directories. These are searched in order before looking in @INC (if -inc). Current directory is used if none are specified. "-verbose => 1" List directories as they are searched Returns the full path of the first occurrence to the file. Package names (eg 'A::B') are automatically converted to directory names in the selected directory. (eg on unix 'A::B' is converted to 'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the search automati- cally if required. A subdirectory pod/ is also checked if it exists in any of the given search directories. This ensures that e.g. perlfunc is found. It is assumed that if a module name is supplied, that that name matches the file name. Pods are not opened to check for the 'NAME' entry. A check is made to make sure that the file that is found does contain some pod documentation. "contains_pod( $file , $verbose )" Returns true if the supplied filename (not POD module) contains some pod information. AUTHOR
Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>, heavily borrowing code from Nick Ing-Simmons' PodToHtml. Tim Jenness <t.jenness@jach.hawaii.edu> provided "pod_where" and "contains_pod". SEE ALSO
Pod::Parser, Pod::Checker, perldoc perl v5.8.0 2002-06-01 Pod::Find(3pm)
All times are GMT -4. The time now is 10:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy