Tag Info

Hot answers tagged

32

I would advise against immediately installing some utility. Basically your biggest enemy here are disk writes. You want to avoid them at all costs right now. Your best bet is an auto-backup created by your editor--if it exists. If not, I would try the following trick using grep if you remember some unique string in your .tex file: $sudo grep -i -a -B100 ...


14

alias without parameter outputs the definitions of currently defined aliases. declare -f outputs the definitions of currently defined functions. export -p outputs the definitions of currently defined variables. All those commands output definitions ready to be reused, you can redirect their outputs directly to a new ~/.bashrc. All lists will contain a ...


12

It is possible, its just going to be a hassle. UPDATE: before you try this method, please have a look at Steven's answer You're going to need the testdisk package, a lot of disk space and a lot of time. PhotoRec, a part of TestDisk, can recover files from almost any disc. PhotoRec does support finding .tex files First, install testdisk by running ...


12

Undeletion is becoming more and more of a myth esp. with modern hardware (SSD) where anything that is deleted is also zeroed out (TRIM) right away, so there is zero chance of getting anything back. Your best bet would be to make an image of whatever you have right now and then see if there is anything left to be found using whatever tools you wish. ...


11

Your overwritten files are lost forever from that partition. Restore them from backup. Running Testdisk from a live CD might help a little; use the Testdisk live CD, which has a number of recovery tools. But be aware that recovery quickly gets difficult; it'll be quicker to recover your own data from backups, and to reinstall any third-party software from ...


10

First check the disks, try running smart selftest for i in a b c d; do smartctl -s on -t long /dev/sd$i done It might take a few hours to finish, but check each drive's test status every few minutes, i.e. smartctl -l selftest /dev/sda If the status of a disk reports not completed because of read errors, then this disk should be consider unsafe for ...


10

First, from your experience with the second card, it seems that your reader is damaged and now damages the cards you insert into it. Stop using that reader immediately, and try to recover the card with another reader. If your data is at all valuable, try to get a brand-name reader with better quality than a bottom-price one. If the card is merely partly ...


9

First, never move a file across the network, only copy. You can always delete the original after the copy has been successfully completed. Secondly, your local system might not even be aware that a filesystem quota exists on remote storage - don't assume that it's even possible to guess ahead of time whether a copy operation would fail due to a remote quota. ...


8

Of course in form they are very different but accomplish the same task. You should read the man page for rm (run man rm) so you understand what the options actually mean. The -r argument to the rm command refers to "recursive", meaning that not just the object you specifiy but any subfolders will also be deleted. The -f is for force, which means it doesn't ...


8

I use SystemRescueCd. It boots to a bash shell (where you can startx if you want) and can mount ntfs drives using ntfs-3g. It also includes a lot of rescue tools.


8

The kernel keeps the partition table in cache permanently (unless explicitly told to reload, and that can't be done if some of the partitions are in use). So you're safe until you reboot (or tell the kernel to operate on data that doesn't reflect the true disk contents; for example, if you've already activated mdraid, it might have written its metadata on ...


8

As with all things pertaining to security, there aren't any guarantees, but you also need to balance risk (and cost) against probability. From experience (and I've been running dozens of *nix boxen since the dark ages), I've never really had significant power-caused filesystem corruption. Some of these machines were even running on non-journalled ...


7

You can use ddrescue or dd_rescue or myrescue to clone the failing disk, without aborting on any unreadable sector. (Myrescue is less configurable but has a better default strategy as it tries to skip over unreadable regions.) This will copy everything including blank space and won't let you set priorities. However, such a low-level approach has an advantage ...


7

There's no way of knowing the best of your options without knowing exactly what is going wrong with the drive. If it's a mechanical failure, avoiding heating it up can help, but if it's due to errors in the servo data, heat isn't likely to matter. I would immediately start copying the unique data to the new drive with rsync. rsync will let you pause, ...


7

Using tail in follow mode should allow you to do what you want. tail -n +0 -f /proc/<pid>/fd/<fd> > abc.deleted I just did a quick test and it seems to work here. You did not mention whether your file was a binary file or not. My main concern is that it may not copy from the start of file but the -n +0 argument should do that even for ...


7

MacOS is a Unix OS and rm means "good-bye". The GUI interface allows you to move a file to the trash (which you can then recover) but that's not what you did. If you have a backup (e.g. you have Time Machine running) then you are saved. Clarification Strictly speaking (as @ire_and_curses points out) a rm simply deletes the directory entry for the file ...


7

It is actually possible if you have set a weak password with no key files. You also need a good GPU. This is done using brute forcing and dictionary attacks You can download a tool called Truecrack which does this at: https://code.google.com/p/truecrack/ Here is an article about it. ...


6

I think that the simplest answer is that dd, dd_rescue and ddrescue are not designed to defeat copy protection schemes. They make no assumptions about the format of the data and try to maintain the integrity of the whole of the original on disk data. In the case of dd I suspect that it is terminating due to an intentional read error on the disk that is part ...


6

First test bzip2 compression, It should output OK. bzip2 -tv FILE.tar.bz2 Next uncompress the tarball, to get just the tar. bunzip2 FILE.tar.bz2 Finally verify the tar file, tar -tvfW FILE.tar Truthfully the best indicator of a problem, is a failed extraction. Hopefully you can narrow down the cause. I should also mention..., I have had the ...


6

I hate to be the bearer of bad news, but... Q: I'm new to mdadm, did I do everything correctly? A: No. In fact, you did just about everything in the most destructive way possible. You used --create to destroy the array metadata, instead of using --assemble which probably would have allowed you to read the data (at least, to the extent the disk is ...


6

Assuming you set a reasonably complex password, from the FAQ this isn't possible! Q: I forgot my password – is there any way ('backdoor') to recover the files from my TrueCrypt volume? A: We have not implemented any 'backdoor' in TrueCrypt (and will never implement any even if asked to do so by a government agency), because it would defeat the ...


5

What you should try is the following: Use file command on the archive to see if it's recognized as gzip-ped data. Run strace gunzip on the file. This will print the last bytes read from the file which might help you identify the point in file where corruption occurs. Run a debug build of gunzip under gdb. Try to correct the corrupted section (you have to ...


5

You have not detailed on how data got lost. If it is a logical deletion, and device has not seen much writing, chances of recovering data are good: the obvious advice is to go for TestDisk & Photorec. Of course, the traditional recommendation: write protect the original device, anyway, expose it to the least possible interaction. Best of all, dd it on ...


5

If your goal is to really "zero" the drive, then I bet the fastest you can get is to issue a low-level secure erase command using hdparm (see here for step-by-step instructions). Note two things: As hdparm manpage vividly states, the operation is "DANGEROUS". On the other hand, it may also repair bad blocks.


5

The worst and most likely case is that you will lose everything. If you have a single logical volume spanning both drives, and you lose one drive with no mirroring, you've essentially wiped out half the file system. From this point, it gets mildly better depending on what file system you are running on your volume. Assuming that you are not using ...


5

This is doable, with some hacking and limitations (you need root privileges). First find what file descriptor is using the application to write the log file then create a symbolic link in the previous log file location and pointing to the file /proc entry, eg: ln -s /var/tmp/file.log /proc/12345/fd/3 The first limitation is that if the file was only open ...


5

First rule of disk recovery: Stop using the disk. If there are hardware issues (such as a head crash), any usage risks further damage; if the filesystem is corrupt, any mount or fsck has the potential to make it worse. (Even in ro mode! Note that mount -t ext3 -o ro will attempt to playback the journal and write to disk!) Use dd_rescue or ddrescue to ...


5

Secure deletion is a tough proposition on any filesystem. Unless the filesystem is very peculiar and guarantees that there aren't other copies of the file lying around, you need to clear all the free space on the device. While you are more likely to find many bits of the file on copy-on-write filesystems, even more “static” filesystems don't have this ...


5

Have a look at the output of smartctl -a /dev/sda. If it's not a cable problem then the disk may be dying. If you don't have a recent backup you should try to copy the block device content (without mounting) using dd_rescue or dd with respective options. After that you may try hdparm --write-sector (always funny these "VERY DANGEROUS" options...). Another ...


5

All of the commits and the files that they reference would be stored as objects in the objects directory. Git creates those as read-only, so they should all still be present. To recover, I'd advise creating a new, empty repository and copying the contents of your broken repository's objects directory into that of the new one. That should get you to a ...



Only top voted, non community-wiki answers of a minimum length are eligible