Searching a partition for a string
Hi guys.
Somewhere on my system I have an e-mail address I need to urgently recover. It might be in a file or it might be in free space. It might also be in the swap partition. I don't know what this address is, but I know it will appear in the very close proximity to another e-mail address that I *do* know. So I need to scan the entire partition for the known address (say it's tom245@testmail.com for example) so I can locate the unknown one near it. Can someone suggest a command line that would search the entire partition and show up the location of the known address? A dump of the cluster it's found in would be a bonus, too. Thanks, CC. |
As root
Code:
find / -name tom245@testmail.com |
Quote:
|
Hello Completely Clueless :)
Maybe something like (not tested) Code:
i=0 Best Charles |
I think (but haven't used it) that the foremost package can be used to do what you want to accomplish.
|
|
Quote:
./searchx: line 10: syntax error near unexpected token `done' ./searchx: line 10: `done' It's ironic. I'm on page 270 of the Linux Scripting Bible and have just finished 'for' loops. Whiles are next. Typical!! |
Quote:
I'd have thought your suggestions are rather overkill? It should be something that can be flagged as a match using some 'dd' scan of the entire partition as suggested by Charles. In Winders some years ago, I had a third-party program called Directory Snoop which found everything everywhere. But that was Winders, where so much of the OS is off-limits. Shouldn't need forensics for this in Linux. |
Quote:
Code:
while true |
Quote:
Well, there must be something else amiss: Code:
1+0 records in |
Quote:
Code:
i=0 |
Well, yes, I guess you could use dd:
Code:
Peter@dv9710us:~ $ echo Testing 1 2 3 > /Share/testfile |
Quote:
Code:
#!/bin/bash Code:
1+0 records in |
Quote:
|
Quote:
Code:
[root@localhost bruno]# ./xsearch |
All times are GMT -5. The time now is 09:55 PM. |