LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2010, 01:30 PM   #1
ibizatunes
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Rep: Reputation: 0
Find out how much dater is being used after a doing a find +500


Hello

Code:
FILE_SIZE=`find /home/joe -type f -mtime +500 du -h | tail -n 1`
I would like FILE_SIZE to have the total figure of disk space used after 500days query is applied in human readable format
All i get is joe total home drive, not the -mtime query amount
Please help

Last edited by ibizatunes; 02-23-2010 at 01:51 PM.
 
Old 02-24-2010, 06:07 AM   #2
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
Find all newer files and count with awk

Code:
find /home/joe -type f -mtime -500 -exec ls -l {} \; | awk '{ s+=$5 } END { print s }'
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP: ldapsearch can't return more than 500 results; Also, can't find slapd.conf mattseanbachman Linux - General 9 04-05-2013 01:41 AM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM
id: cannot find name for group ID 500 linexnal Linux - Newbie 9 07-19-2007 11:17 AM
cannot find user ID 500 fernin8r Linux - General 32 07-17-2007 01:32 PM
id: cannot find name for user ID 500 stakhous Linux - Newbie 1 07-02-2004 02:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration