Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-18-2006, 08:22 AM
|
#1
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Word search
I've just restored my rm'ed ext2 partition. Now I have about 1 million $Inode files. So I need a way how to identify which files I need to restore. I could find these files by searching for some word which I know they would include. So I tried: cat *|grep WORD but I got an error from cat: too many arguments or smth similar. Can anybody give me any suggestion?
Thanks in advance
It would be sad if I didn't recover them having gone so far.
File names go like this $Inode1 - $Inode1002324.
|
|
|
04-18-2006, 09:39 AM
|
#2
|
LQ Newbie
Registered: Mar 2006
Location: Serbia
Distribution: Slackware 10.2
Posts: 8
Rep:
|
grep WORD *
|
|
|
04-18-2006, 10:33 AM
|
#3
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Original Poster
Rep:
|
As I said:
Code:
/usr/bin/grep: Argument list too long
|
|
|
04-18-2006, 11:45 AM
|
#4
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Code:
find . -print0 | xargs -0 grep WORD
|
|
|
04-19-2006, 12:53 AM
|
#5
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Original Poster
Rep:
|
Thank you, mdarby. You have saved me from another 3 hours of desperate picoing.
|
|
|
04-19-2006, 06:52 AM
|
#6
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
But of course. I'm quite the fan of xargs
|
|
|
All times are GMT -5. The time now is 11:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|