Any idea the command to find and replace a file by name and size
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You come across as fairly demanding. Here is another suggestion: RTFM. In this case, TFM can be accessed with man find. In the output of that command, you can search by typing the slash key on your keyboard, then entering something like "size" and pressing the ENTER key. Searching again is accomplished by pressing the lower-case n key, or upper case if you want to reverse the search direction. This is an important skill to learn and practice if you want to work with Linux and other UNIX-like operating systems.
Last edited by berndbausch; 11-19-2015 at 09:02 PM.
You come across as fairly demanding. Here is another suggestion: RTFM. In this case, TFM can be accessed with man find. In the output of that command, you can search by typing the slash key on your keyboard, then entering something like "size" and pressing the ENTER key. Searching again is accomplished by pressing the lower-case n key, or upper case if you want to reverse the search direction. This is an important skill to learn and practice if you want to work with Linux and other UNIX-like operating systems.
No I didn't, you come off too sensitive.
But if I was searching for confusion you would be very helpful.
I was hoping for a command that could search and find a file bigger than a certain size and remove it directory wide. I suppose this could be too advanced, if so my bad for over estimating you. A modification
It's funny I teach children computer and sports skills all week for free at the boys club. Maybe next time I will just tell them to go find it on the Internet. After all sharing skills is like being a commy right.
No. I just wanted to point out that some people at LQ don't like this attitude. I don't care.
Quote:
Originally Posted by dwhswebhosting
But if I was searching for confusion you would be very helpful.
You were confused to begin with. The philosophy here is that people should try before asking questions. Like trying to read the man page. If you don't understand the man page, you will get help.
Quote:
Originally Posted by dwhswebhosting
I was hoping for a command that could search and find a file bigger than a certain size and remove it directory wide.
It's in the man page.
Quote:
Originally Posted by dwhswebhosting
It's funny I teach children computer and sports skills all week for free at the boys club. Maybe next time I will just tell them to go find it on the Internet. After all sharing skills is like being a commy right.
I know we've been discussing the issues that lead to http://www.linuxquestions.org/questi...#faq_lqwelcome here at LQ recently, but in this case the OP gave an example of what they tried and asked a very specific question. Don't you think something along the line of "The flag you're looking for is -size, you may want to check out the man page for usage specifics." would have been significantly more helpful?
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,597
Rep:
Quote:
Originally Posted by berndbausch
You come across as fairly demanding. Here is another suggestion: RTFM.
Keep in mind that the RTFM attitude is something we try to avoid here at LQ.
Quote:
Originally Posted by berndbausch
In this case, TFM can be accessed with man find. In the output of that command, you can search by typing the slash key on your keyboard, then entering something like "size" and pressing the ENTER key. Searching again is accomplished by pressing the lower-case n key, or upper case if you want to reverse the search direction. This is an important skill to learn and practice if you want to work with Linux and other UNIX-like operating systems.
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,597
Rep:
Quote:
Originally Posted by dwhswebhosting
Can you paste the code here please.
On the flip side of my previous two posts... While we're happy to help you here at LQ, that help should come in an educational way which encourages you to learn and not to simply hand out exact specific commands for each task you'd like to accomplish.
Don't you think something along the line of "The flag you're looking for is -size, you may want to check out the man page for usage specifics." would have been significantly more helpful?
--jeremy
OMG. You'd think "Find file by size" in a search engine is telling him. but OK, I'll try to be 'nicer' next time.
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,597
Rep:
Quote:
Originally Posted by Habitual
OMG. You'd think "Find file by size" in a search engine is telling him. but OK, I'll try to be 'nicer' next time.
I think you're slightly missing the point. It's not about being "nice" (although LQ does aim to be friendly and welcoming to all members). If LQ is to simply be a bunch of links to search engines with specific phrases, what's the point? LQ itself should be a repository of knowledge available to the Open Source community as well as a place where that community can come together for discussion and collaboration.
I think you're slightly missing the point. It's not about being "nice" (although LQ does aim to be friendly and welcoming to all members). If LQ is to simply be a bunch of links to search engines with specific phrases, what's the point?
The 'point' is that Search Engines are how most of us found our answers, back when we didn't have anyone else to ask, we had to use them.
Maybe I'm skewed, but I get the impression that people just want to post a question, and wait for the answer in their inbox.
Search engines (dare I say it?) got most of us here!
I have to throw in the towel here.
As much as I love a good discussion, it's the same old hamster on the same old wheel.
But I'll try to adapt and be more voluntary with meaningful info.
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,597
Rep:
Quote:
Originally Posted by Habitual
The 'point' is that Search Engines are how most of us found our answers, back when we didn't have anyone else to ask, we had to use them.
Search Engines and research are certainly how I got my answers, but that wasn't ideal either and is in large part why I created LQ.
Quote:
Originally Posted by Habitual
Maybe I'm skewed, but I get the impression that people just want to post a question, and wait for the answer in their inbox.
I agree, we need to help create and foster a culture that encourages learning and does not expect spoon fed answers with no work by the OP. It's a difficult balance sometimes.
Quote:
Originally Posted by Habitual
I have to throw in the towel here.
As much as I love a good discussion, it's the same old hamster on the same old wheel.
But I'll try to adapt and be more voluntary with meaningful info.
Thanks Jeremy.
I know it can be frustrating at time, but I really do appreciate it. It's valued members such as yourself that make LQ what it is. Thank you Habitual.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.