LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-21-2010, 09:37 PM   #1
razor7
LQ Newbie
 
Registered: Apr 2004
Location: Argentina
Distribution: Ubuntu GNU/Linux
Posts: 16

Rep: Reputation: 0
Struggling with ls command


Hi folks, I need some help with the ls command...(sorry for the silly rookie question)

I need to search in "/" and all subdirectories, all files greather than 30 MB...

Thanks in advise!
 
Old 02-21-2010, 09:42 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
You should use the "find" command for this. For example:

Code:
find / -size +30M
Evo2.
 
Old 02-21-2010, 09:42 PM   #3
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
For that, the find command is probably better:

Code:
find / -size +30M
 
Old 02-21-2010, 09:58 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
The 'ls' command only lists files, it does not filter them.
You could probably do it with grep/sed/awk but its better to just use find.
@mattca,evo2: LOL Same thing @ the same minute.
 
Old 02-21-2010, 10:01 PM   #5
razor7
LQ Newbie
 
Registered: Apr 2004
Location: Argentina
Distribution: Ubuntu GNU/Linux
Posts: 16

Original Poster
Rep: Reputation: 0
Woooowww....incredible fast reply!...thanks a lot! mattca and evo2! worked as axpected!

Best regards!
 
Old 02-21-2010, 10:21 PM   #6
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
haha, evo was ahead by a nose!
 
  


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
struggling with this prakash.akumalla *BSD 3 07-14-2008 09:25 AM
Yet another struggling newbie. rscds LinuxQuestions.org Member Intro 1 05-18-2008 09:44 AM
Struggling with Math, need help randyriver10 General 45 08-28-2007 05:27 AM
struggling with getopts mike9287 Programming 6 07-14-2006 12:42 AM
new to ipsec, struggling eagle683 Linux - Newbie 1 06-08-2005 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 PM.

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