LinuxQuestions.org
Visit Jeremy's Blog.
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 11-20-2015, 07:42 PM   #16
dwhswebhosting
LQ Newbie
 
Registered: Jun 2004
Location: Earth
Distribution: CentOS 6 and 7
Posts: 24

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by berndbausch View Post
Your confusing confusion with trying to get help, I would help you understand the difference but your simply not worth it.

I will say thanks for helping the demise of this forum. Well done. (that's what is called sarcasm, you can Google what that is)
 
Old 11-20-2015, 09:43 PM   #17
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,691

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Well sorry for telling you RTFM, but honestly I (like most people I would think) don't know all options by heart and would have to look them up anyway. So why don't you read the man page?

The parameter is, unsurprisingly, named "size". You can use it to find files that are larger or smaller than the provided size, or the exact size. Something like "-size +5GB" in your case. Read the man page to double-check. I told you already how to search inside a man page.

You also want to delete those files. One way to do this is adding the "-exec rm {} \;" option. This is inefficient if you find many files, since you start up the "rm" program each time a matching file is found, but I don't think you have too many 5GB files.
And I would agree that the syntax is ugly.

If you expect that many files match the search criteria, you are better off with running a single rm command and give it the list of all files:
Code:
rm $(find -whateverfilesyouwanttoselect)
Now the problem is that you might have more file that fit rm's parameter list. In this case, use xargs:
Code:
find -whateverblabla | xargs rm
 
  


Reply

Tags
find command, remove


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
[SOLVED] how we can find and replace multiple file using sed command jayakumar01 Linux - Server 1 04-05-2012 07:53 AM
[SOLVED] Command to find in each file and replace one or two words Sha_unix Linux - Newbie 7 11-22-2011 01:44 PM
[SOLVED] command to find/replace in a text file? sneakyimp Linux - Newbie 17 02-15-2011 12:30 AM
Linux command to find and replace string within text file chips11 Linux - Newbie 5 11-24-2008 02:25 PM
command line edit -- global find/replace on text file w/o going into vi car182 Linux - Newbie 4 05-25-2006 05:42 PM


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