Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

linux operating commands and unix operating commands

Command to list Files less than or equal to 2k size

UNIX for Advanced & Expert Users


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-26-2003   -   Original Discussion by bache_gowda
bache_gowda's Unix or Linux Image
bache_gowda bache_gowda is offline
Registered User
 
Join Date: Sep 2001
Last Activity: 6 April 2015, 1:40 PM EDT
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Command to list Files less than or equal to 2k size

Hi,
*.xml files stored on date wise folders. I need to extract *.xml files from all the folders. File size is lessthan or equal to 2K. Please let me know command or some shell program to due this job on linux m/c

This is urgent,
Thanks in advance
- Bache Gowda
Sponsored Links
    #2  
Old Unix and Linux 12-26-2003   -   Original Discussion by bache_gowda
google's Unix or Linux Image
google google is offline Forum Advisor  
Advisor
 
Join Date: Jul 2002
Last Activity: 17 June 2009, 5:17 PM EDT
Location: Atlanta
Posts: 740
Thanks: 0
Thanked 3 Times in 2 Posts
check out the find command. See man find and search the boards using the keyword 'find' for examples of its use.
Sponsored Links
    #3  
Old Unix and Linux 12-26-2003   -   Original Discussion by bache_gowda
jayakhanna's Unix or Linux Image
jayakhanna jayakhanna is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 2 April 2004, 8:20 AM EST
Location: India
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
ls -l | awk '{ if ($5 < 2000) { print $0 }}'


Regards
JK
    #4  
Old Unix and Linux 12-26-2003   -   Original Discussion by bache_gowda
bache_gowda's Unix or Linux Image
bache_gowda bache_gowda is offline
Registered User
 
Join Date: Sep 2001
Last Activity: 6 April 2015, 1:40 PM EDT
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks to all,
I got the answer
$find ./ -name *.xml -size -4 for less thank 2k and 4 for exactly for 2k

- Bache Gowda
Sponsored Links
Closed


Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Command to list our directory size lsy UNIX for Dummies Questions & Answers 5 03-22-2012 07:50 AM
How to list files which have same size? shahril UNIX for Dummies Questions & Answers 3 11-22-2010 01:27 PM
list the files with size in bytes balireddy_77 Shell Programming and Scripting 4 01-06-2009 01:17 PM
command to list file size rgordon HP-UX 3 12-05-2007 05:43 AM
Files list which are more than 300 MB size redlotus72 UNIX for Dummies Questions & Answers 2 09-14-2006 01:28 AM



All times are GMT -4. The time now is 10:30 PM.