LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2005, 10:49 PM   #1
eggoz
Member
 
Registered: Feb 2003
Posts: 159

Rep: Reputation: 30
Search and Size


I am trying to search for files and give me the total size for the files found. This is what I have tried and what I have gotten.

find *.jpg /var/www/html/albums/ | grep du -ac
find: *.jpg: No such file or directory
218

if I run just the find command as such, find *.jpg /var/www/html/albums/, i get all the pictures just find.

I also tried this...

[root@Sun root]# du -c /var/www/html/albums/*.jpg
du: `/var/www/html/albums/*.jpg': No such file or directory
0 total


It doesn't like the *jpg. I believe this is cause it's only looking in the albums dir, and the pictures are are in dirs under that.
 
Old 08-31-2005, 11:17 PM   #2
eggoz
Member
 
Registered: Feb 2003
Posts: 159

Original Poster
Rep: Reputation: 30
I came across this command(s). It appears to be working, but if somebody could verify.
[root@Sun albums]# find /var/www/html/albums/ -type f -path *.jpg |xargs du -shc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
search default: search post title only slackie1000 LQ Suggestions & Feedback 4 03-10-2005 08:50 AM
To search for files of a particular size mufy Linux - General 1 12-09-2004 01:44 AM
search for files based on file size fatrandy13 Linux - General 1 12-05-2004 11:47 PM
Size of search engines the_imax General 3 08-08-2004 01:45 AM
Quick VIM question (unhighlighting search terms after search) lrt2003 Linux - Newbie 5 05-08-2004 06:21 PM


All times are GMT -5. The time now is 08:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration