Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 07-20-2014, 10:04 AM   #1
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,383

Rep: Reputation: 76
Looking for a string in the hd disregarding the file structure.

Hi: I have lost a file containing some vital information. The file was a plain ASCII text file. I know the file contained the string youtube. So, it is likely that string is somewhere on the disk. Is there a program that searches the entire hard disk for a given string? I mean, this program should look at every sector on the disk, whether the sector belongs to a file or not. If we number all the sectors on the disk from 1 to the total number of sector in the disk, then it would have to inspect sector #1, then sector #2 and so on, until all of the sectors have been inspected. Also, it would have to consider the case where, say, a sector contains yout at the end and ube at the beginning of the next sector. If there was no fragmentation then it should find it, given it really is in the disk.
Old 07-20-2014, 11:39 AM   #2
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
I would try foremost and maybe photorec for this. Foremost is configurable to look for a certain string.
Old 07-20-2014, 12:43 PM   #3
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870
Use Photorec to recover all text files from the free soace on that partition, then a simple grep over the recovered files should show you the potential candidates for missing file.


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 to Initialize an array of string literals inside a structure Jusctsch Programming 2 11-08-2011 05:22 PM
read string after specific string from a text file using C++ programing language badwl24 Programming 5 10-08-2009 06:41 AM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 10:18 AM
How to assign a string to a structure variable in C? daYz Programming 7 06-13-2007 03:38 PM
Icewm seems to be disregarding some of its configuration files. Royle Debian 3 02-26-2005 06:12 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration