The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 09:06 AM
Find accessed file in past 1 or 2 minutes, and throw mail. varungupta UNIX for Advanced & Expert Users 2 09-12-2007 03:07 AM
Find the file from 15 days ago YoungBlood Shell Programming and Scripting 2 03-03-2007 07:28 PM
file was created before 15 days ago. YoungBlood UNIX for Dummies Questions & Answers 1 03-02-2007 01:23 PM
ls latest 4 days or specify days of files in the directory happyv Shell Programming and Scripting 3 01-22-2007 07:16 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-24-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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.
  #2 (permalink)  
Old 08-24-2008
dr46014 dr46014 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 94
sorry for the confusion..i got it ... thanks again
  #3 (permalink)  
Old 08-25-2008
dr46014 dr46014 is offline
Registered User
  
 

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

How can i resolve this error..
  #4 (permalink)  
Old 08-25-2008
dr46014 dr46014 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 94
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 }'
  #5 (permalink)  
Old 08-25-2008
dr46014 dr46014 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 94
any solution for this ....??
  #6 (permalink)  
Old 08-26-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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"
Closed Thread

Bookmarks

Tags
csv, file size

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0