How to recover deleted files in linux filesystem (a bit faster)?
The file you are working on is /dev/sda10
which grep
would assume to contain binary data. In order to treat it as text (which you are looking for) you need the -a
otherwise grep
will just print Binary file /dev/sda10 matches
In addition since the task is IO rather than CPU bound it would not be a big performance gain in any case.
In the future it's quite easy to test something like this by yourself:
- create dummy 10Mb disk:
dd if=/dev/zero of=testfs bs=1024 count=10000
- create filesystem:
mkfs.ext4 testfs
- mount via loopback:
mount -o loop ./testfs /mnt/test/
- copy some stuff on the dummy filesystem
- unmount:
umount /mnt/test
- run
grep
on the test file with different options
EDIT
it just occurred to me that maybe you are looking for the command '/usr/bin/strings' instead
something like:
- extract all printable strings from ruined disk:
/usr/bin/strings -a /dev/sda10 > /tmp/recovery
- grep on the text only many times for different strings:
grep "whatever" /tmp/recovery > /tmp/recovery.whatever
Recover deleted folder from Google VPS
Getting any files back from your VM's disk may be tricky (at best) or impossible (most probably) if the files got overwritten.
Easiest way would be to get them back from a copy or snapshot of your VM's disk. If you have a snapshot of your disk (either taken manually or automatically) from before when the folder in question got delete then you will get your files back.
If you don't have any backups then you may try to recover the files - I've found many guides and tutorials, let me just link the ones I believe would help you the most:
- Unix/Linux undelete/recover deleted files
- Recovering accidentally deleted files
- Get list of files deleted by rm -rf
------------- UPDATE -----------
Your last chance in this battle is to make two clones of the disk
and then detach original disk from the VM and attach one of the clones to keep your VM running. Then use second clone for any experiments. Keep the original untouched in case you mess up the second clone.
Now create a new Windows VM and attach your second clone as the additional disk. At this moment you're ready to try various data redovery software;
- UFS Explorer
- Virtual Machine Data Recovery
There are plenty of others to try from too.
Another approach would be to create an image from the original disk and export it as a VMDK imagae (and save it to a storage bucket). Then download it to yor local computer and then use for example VMware VMDK Recovery or other specialized software for extracting data from virtual machines disk images.
Related Topics
How to Allow Jenkins to Access The Files That Only Root or Some Specific Programs Have Access To
How to Use Source Command Within Jenkins Pipeline Script
Can Multiple .Gz Files Be Combined Such That They Extract into a Single File
Only Accept Http Connections from Localhost in Go
What Is Dma Mapping and Dma Engine in Context of Linux Kernel
Find Files Modified Over 1 Hour Ago But Less Than 3 Days
Any Good Tools to Solve Integer Programs on Linux
Symbol Lookup Error: ./Executablename: Undefined Symbol: _Zn18Qxmldefaulthandlerc2Ev
How to Install Python Modules in a Docker Image
Where to Put Svn Repository Directory in Linux
Powershell's Equivalent to Linux's: Ls -Al
What Is The Equivalent of /Proc/Cpuinfo on Freebsd V8.1
How to Answer Yes in Bash Script
Correcting The Gcc Command Line Ordering Using Automake
Inappropriate Ioctl for Device When Trying to Ssh
How Does Boost Asio's Hostname Resolution Work on Linux? How to Use Nss