mac删除文件恢复_如何在Mac上恢复已删除的文件

编程入门 行业动态 更新时间:2024-10-24 05:16:15

mac删除文件恢复

Nearly everyone has accidentally deleted a file before. Whether it’s family pictures or important documents, all files are just data on your hard drive, and that data doesn’t exactly go away after you delete it. There are plenty of ways to recover them after being sent to the trash.

几乎每个人之前都意外删除了一个文件。 不管是全家福还是重要文件,所有文件都只是硬盘上的数据,并且删除后这些数据并不会完全消失。 有很多方法可以将它们发送到垃圾箱后进行回收。

Today we’re going to show you a couple of ways to get those files back, because even when things are deleted, they aren’t always completely gone. And hopefully if one of the methods doesn’t work, one of the other ones will.

今天,我们将向您展示几种方法来取回这些文件,因为即使删除了内容,它们也不一定总是完全消失。 希望如果其中一种方法不起作用,则其他方法中的一种也可以。

保持定期备份以防止删除 (Keep Regular Backups to Prevent Deletion in the First Place)

macOS’s Time Machine is a great, built-in way to handle backups automatically. If you have an old external hard drive lying around (or some spare cash for a new one), hook it up and then navigate to System Preferences > Time Machine > Select Backup Disk. You can select your external hard drive, and turn on automatic backups.

macOS的Time Machine是一种很棒的内置方法,可以自动处理备份。 如果周围有旧的外部硬盘驱动器(或一些备用现金用于新的),则将其连接起来,然后导航至“系统偏好设置”>“ Time Machine”>“选择备份磁盘”。 您可以选择外部硬盘驱动器,然后打开自动备份。

Time Machine keeps your computer’s data securely backed up on your external hard drive, and you can browse back in time through old versions of your files.

Time Machine可以将您的计算机数据安全地备份到外部硬盘驱动器上,并且您可以及时浏览旧版本的文件。

If you don’t trust your old hard drive (or you want an additional offsite backup), you can always use something like Arq, which lets you back up to the cloud using your own AWS S3 instance, Google Drive, or Dropbox.

如果您不信任旧的硬盘驱动器(或想要额外的异地备份),则可以始终使用Arq之类的东西,它使您可以使用自己的AWS S3实例,Google Drive或Dropbox备份到云。

检查垃圾桶 (Check the Trash Can)

Hitting “Delete” doesn’t actually delete files. It sends them to the trash, which you have to manually empty to get rid of them forever.

点击“删除”实际上并不会删除文件。 它将它们发送到垃圾桶,您必须手动将其清空以永久清除它们。

The Trash is usually located at the end of your dock. Right-click it and click the “Open” command. It should give you a list of files that you’ve deleted recently—at least, since the last time you emptied it. And if you haven’t emptied it in a while, doing so might get you back quite a bit of disk space.

垃圾桶通常位于码头的尽头。 右键单击它,然后单击“打开”命令。 它应该为您提供最近删除的文件列表,至少从上次清空以来就已删除。 而且,如果您有一段时间没有清空它,这样做可能会使您收回很多磁盘空间。

检查其他垃圾箱 (Check the Other Trash Cans)

If your file was stored on a USB flash drive or external hard drive, those have their own Trash you can check for deleted files. They’re hidden by default, though, so you have to do a little digging.

如果您的文件存储在USB闪存驱动器或外部硬盘驱动器上,则它们具有自己的回收站,您可以检查是否已删除文件。 不过,默认情况下它们是隐藏的,因此您必须进行一些挖掘。

Whenever you use an external drive, your Mac creates a bunch of hidden folders starting with a period to help the drive work better with macOS. One of these hidden folders is “.Trashes” and it contains the trash for that drive.

每当您使用外部驱动器时,Mac都会创建一堆以句点开头的隐藏文件夹,以帮助驱动器更好地与macOS配合使用。 这些隐藏的文件夹之一是“ .Trashes”,其中包含该驱动器的垃圾箱。

Enable Hidden Files in Sierra or Later

在Sierra或更高版本中启用隐藏文件

If you’re using macOS Sierra or later, you can view hidden files in Finder by simply using the SHIFT+CMD+. hotkey (that’s the period key).

如果您使用的是macOS Sierra或更高版本,则只需使用SHIFT + CMD +即可在Finder中查看隐藏的文件。 热键(这是句号)。

If You’re Using an Older OS X Version

如果您使用的是旧版OS X

You can enable hidden files in Finder by running the following commands in Terminal. Press Command+Space and type “Terminal” to bring it up. At the prompt, paste these two lines in there one at a time, hitting Enter after each line:

您可以通过在终端中运行以下命令来在Finder中启用隐藏文件。 按Command + Space,然后键入“ Terminal”将其调出。 在提示符下,将这两行一次粘贴到其中,在每行之后按Enter键:

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

After running these commands, you should be able to see the “.Trashes” folder. You can even empty it from Finder to clear some space on a USB stick.

运行这些命令后,您应该能够看到“ .Trashes”文件夹。 您甚至可以从Finder中清空它,以清除USB记忆棒上的一些空间。

Should you want to stop showing hidden files (they’re hidden for a reason, and there are a lot of them), you can run the same commands in Terminal again, but replace “TRUE” with “FALSE” on the first line:

如果您要停止显示隐藏文件(由于某种原因它们被隐藏,并且有很多隐藏文件),则可以再次在Terminal中运行相同的命令,但在第一行将“ TRUE”替换为“ FALSE”:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

That should clean things up for you.

那应该为您清理事情。

如果其他所有方法均失败,请使用磁盘钻取 (If All Else Fails, Use Disk Drill)

Even when you empty your trash, deleted files aren’t removed from your hard drive right away. Instead, macOS marks them as available space. Your data is still there until it gets overwritten by something else. This means that if you have an app that can read the files directly off your hard drive, you could recover them in full if you do it quickly enough after deletion.

即使清空垃圾桶,删除的文件也不会立即从硬盘驱动器中删除。 相反,macOS将它们标记为可用空间。 您的数据仍然存在,直到被其他内容覆盖为止。 这意味着,如果您有一个可以直接从硬盘驱动器读取文件的应用程序,则删除后如果足够快地进行操作,则可以完全恢复它们。

One tool that does this very well is Disk Drill. It scans your hard drive for any files that are still waiting to be overwritten and recovers them for you, bringing your documents back from the computer grave.

Disk Drill ( 磁盘钻探)是一种很好地完成此任务的工具。 它会扫描您的硬盘驱动器以查找仍在等待被覆盖的所有文件,并为您恢复它们,从而将文档从计算机中带回。

Note that any extra data you put on your hard drive could overwrite the files, so if you’re extra cautious, download Disk Drill on another computer and put it on a flash drive. The last thing you want is that download overwriting the data you want to recover.

请注意,您放入硬盘驱动器上的所有其他数据都可能会覆盖文件,因此,如果您格外谨慎,请在另一台计算机上下载Disk Drill并将其放在闪存驱动器上。 您想要的最后一件事是下载将覆盖您要恢复的数据。

When you open it for the first time, Disk Drill will ask you to select your disk and perform a scan. Select OS X if you want to scan your main disk. The scan may take a few minutes, but when it’s done, you’ll be presented with a list of recently deleted files. Many of these are junk, but if you know what you’re looking for (pictures, for example) you can sort them and open the folders you want. Most files should be under your home directory with your name on it.

首次打开磁盘时,Disk Drill会要求您选择磁盘并执行扫描。 如果要扫描主磁盘,请选择OSX。 扫描可能需要几分钟,但完成后,将向您显示最近删除的文件的列表。 其中许多都是垃圾,但是如果您知道要查找的内容(例如图片),则可以对它们进行排序并打开所需的文件夹。 大多数文件应位于主目录下,并带有您的名字。

Once you’ve found the files, right-click them, choose the “Recover” option, and then select the directory where you’d like to save the recovered files. Ideally, you should use an external drive to prevent other files from being overwritten. For this demonstration, I just used my hard drive, and it worked fine.

找到文件后,右键单击它们,选择“恢复”选项,然后选择要保存恢复的文件的目录。 理想情况下,您应该使用外部驱动器来防止其他文件被覆盖。 在此演示中,我仅使用了硬盘驱动器,并且运行良好。

If all goes well, you should see your recovered files appear in the directory you chose. I deleted a screenshot on my desktop, emptied the Trash, and was then able to recover it with Disk Drill, 100% intact.

如果一切顺利,您应该看到恢复的文件出现在您选择的目录中。 我删除了桌面上的屏幕截图,清空了“废纸rash”,然后能够使用磁盘钻探(完整无损地恢复)来恢复它。

Your odds of recovery will go down for older files—since your computer has had more time to overwrite them—so it’s best to act quickly after discovering you’ve accidentally deleted a file.

由于计算机有更多时间来覆盖较旧的文件,因此恢复较旧文件的几率会降低。因此,最好是在发现意外删除文件后Swift采取行动。

Note that you will need to buy the full version of Disk Drill to recover files. The free version only scans for files and shows you that they exist. This isn’t too bad though, because at least you can verify that your files are there before buying the app.

请注意,您将需要购买完整版的Disk Drill才能恢复文件。 免费版本仅扫描文件,并向您显示它们是否存在。 不过,这还算不错,因为至少您可以在购买应用程序之前验证文件是否存在。

The exception to this is if you have Disk Drill already installed, you can use their “Recovery Vault” to track deleted files and save a copy when you delete them. This ensures that whenever you accidentally remove something, you can always get it back, and it’s a completely free feature. It does use extra hard drive space though, so it’s not for everyone.

例外情况是,如果您已经安装了Disk Drill,则可以使用其“恢复保管库”来跟踪已删除的文件并在删除它们时保存副本。 这样可以确保每当不小心删除某物时,您都可以随时将其取回,并且这是一项完全免费的功能。 不过,它确实占用了额外的硬盘空间,因此并不适合所有人。



Disk Drill isn’t the only data recovery tool around. PhotoRec is a free app that can recover photos and other files, though it is a bit clunkier to use. There are other commercial options, such as Data Rescue and EaseUS, but they all share the same price point as Disk Drill. Overall, many of these tools will have low success rates, and Disk Drill is good for being able to see which files are intact before buying.

Disk Drill不是唯一的数据恢复工具。 PhotoRec是一个免费的应用程序,可以恢复照片和其他文件,尽管使用起来有点笨拙。 还有其他商业选择,例如Data Rescue和EaseUS ,但它们都与Disk Drill具有相同的价格点。 总体而言,这些工具中的许多工具的成功率都较低,Disk Drill可以帮助您在购买之前查看哪些文件是完整的。

Image Credits: Shutterstock

图片来源: Shutterstock

翻译自: https://www.howtogeek/361816/how-to-recover-deleted-files-on-mac/

mac删除文件恢复

更多推荐

mac删除文件恢复_如何在Mac上恢复已删除的文件

本文发布于:2023-06-13 10:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1381496.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   如何在   mac   Mac

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!