The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
remove a file after 30 days dr46014 Shell Programming and Scripting 7 11-09-2007 06:06 AM
Find accessed file in past 1 or 2 minutes, and throw mail. varungupta UNIX for Advanced & Expert Users 2 09-12-2007 12:07 AM
Find the file from 15 days ago YoungBlood Shell Programming and Scripting 2 03-03-2007 04:28 PM
file was created before 15 days ago. YoungBlood UNIX for Dummies Questions & Answers 1 03-02-2007 10:23 AM
ls latest 4 days or specify days of files in the directory happyv Shell Programming and Scripting 3 01-22-2007 04:16 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 08-24-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Works for me, I get line counts here. You could see if changing the field numbers in the awk script would improve things (change $1 to $2 perhaps) but I highly doubt it will.
Reply With Quote
Forum Sponsor
  #9  
Old 08-24-2008
Registered User
 

Join Date: Jun 2007
Posts: 70
sorry for the confusion..i got it ... thanks again
Reply With Quote
  #10  
Old 08-25-2008
Registered User
 

Join Date: Jun 2007
Posts: 70
xargs: a single arg was greater than the max arglist size of 2048 characters

How can i resolve this error..
Reply With Quote
  #11  
Old 08-25-2008
Registered User
 

Join Date: Jun 2007
Posts: 70
find /data/XYZ -mtime -7 -name 'DailyFile*.txt' -print | xargs wc ...

How wc will be identify the list of record.if we are writing the below line entire records in the folder is getting displayed.Can you please tell me how to handle this means i need last 7 days record.Again the "xargs: a single arg was greater than the max arglist size of 2048 characters".becoz i need the MB GB info also in my csv file


wc /data/XYZ/Daily_File*.txt | nawk -v OFS=, '{ print $4, $1, $3 }'
Reply With Quote
  #12  
Old 08-25-2008
Registered User
 

Join Date: Jun 2007
Posts: 70
any solution for this ....??
Reply With Quote
  #13  
Old 08-26-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
The xargs error message means that there is a single file name which is longer than 2048 bytes. This is a very low limit for ARG_MAX but not unheard of. If you can cd into the directory and then use relative file names, that might be an acceptable workaround.

I don't understand "How [will] wc identify the list of record"
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
csv, file size

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0