LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-18-2011, 06:03 AM   #1
pavel
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: Disabled
files recovery swap partition


Hi all, I`m new to the linux OS
I installed Ubuntu 10.10 on my PC. During the installation process i selected a partion on my hdd for swap , there i had some important files can i rocover it some how
 
Old 05-18-2011, 07:01 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,927

Rep: Reputation: 280Reputation: 280Reputation: 280
You can use foremost. You might have to adjust the .conf file for the file type you want to recover, but there are many default types you can just specify on the command line. Foremost will find the files, and put them in the specified directory.

[linux@sam] # foremost -d -v -q -b 1024 -k 1024 -o ~/rescued_files -t jpg -t doc -t txt -t pdf -i /dev/sda3

This command line is read from left to right:

-d use indirect blocking
-v verbose output
-q quick mode (only searches the beginning of each sector for header bytes)
-b block size (ram dependent)
-k chunk size in MB (ram dependent, about 1/2 total ram is good)
-o directory to store recovered files
-t file types to be recovered (in this example: JPEG, MS Word, Portable Document Format, and text)
-i input file (place to look for files to recover)


If your looking for a weird file type, you can find the header bytes from an existing file of that type, like so:

dd if=file_name count=1 | hexdump -C | less

and look at the first four bytes. Then, make your entry in foremost.conf. You'll have to read the man page for more information. But the default file types are usually adequate.
 
  


Reply


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
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 08:49 PM
how recovery swap partition suneth2318 Linux - Laptop and Netbook 5 08-22-2010 05:04 AM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM


All times are GMT -5. The time now is 07:52 AM.

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