我应该在 Ubuntu 中使用哪个归档实用程序?
我是 Mac/Ubuntu 用户。 我有“AWK”、“awk”、“awk_tip”和“awk_notes”等文件夹。 我需要将它们存档,但各种实用程序让我感到困惑。 我看过 Tar、cpio 和 pax,但 Git 开始让我着迷。 我偶尔需要加密和备份。
请列出不同归档实用程序的优缺点。
I am a Mac/Ubuntu user. I have folders such as "AWK", "awk", "awk_tip" and "awk_notes". I need to archive them, but the variety of utilities confuse me. I had a look at Tar, cpio and pax, but Git has started to fascinate me. I occasionally need encryption and backups.
Please, list the pros and cons of different archiving utilities.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Tar、cpio 和 pax 是古老的 Unix 实用程序。 例如,tar(这可能是其中最常见的)最初用于在磁带上进行备份(因此得名,tar = 磁带存档)。
当今最常用的归档格式是:
如果您只需要一个简单的工具,请使用 zip。 它在大多数平台上开箱即用,并且可以受密码保护(尽管这种保护在技术上很弱)。
如果您需要更强的保护(加密),请查看 TrueCrypt。 这很棒。
Tar, cpio and pax are ancient Unix utilities. For instance, tar (which is probably the most common of these) was originally intended for making backups on tapes (hence the name, tar = tape archive).
The most commonly used archive formats today are:
If you want just one simple tool, take zip. It works right out of the box on most platforms, and it can be password protected (although the protection is technically weak).
If you need stronger protection (encryption), check out TrueCrypt. It is very good.
您在什么操作系统/工具链下工作? 这可能会限制现有解决方案的范围。 你的名字暗示了 Unix,但是是哪一个呢? 此外,您是否需要可移植性?
标准的 Linux 解决方案(至少对于像我这样的新手来说)可能是 tar 和 gzip 或 bzip2 文件夹,然后如果确实需要的话用 gnupg 加密它们(加密 awk 教程对我来说似乎有点矫枉过正)。 您还可以使用成熟的备份解决方案,例如 bacula,使用 rsync 同步到不同位置(也许同步到备份服务器?)。
Under what OS / toolchain are you working? This might limit the range of existing solutions. Your name suggests Unix, but which one? Further, do you need portability or not?
The standard linux solution (at least to a newbie like me) might be to tar and gzip or bzip2 the folders, then encrypt them with gnupg if you really have to (encrypting awk tutorials seems a bit of overkill to me). You can also use full-fledged backup solutions like bacula, sync to a different location with rsync (perhaps sync to a backup server?).
如果您从 ext2/ext3 文件系统备份目录,您可能需要考虑使用 dump。 一些不错的功能:
它不支持加密,但您可以随时对转储文件进行加密。
If you've backing up directories from an ext2/ext3 filesystem, you may want to consider using dump. Some nice features:
It doesn't support encryption, but you can always encrypt the dump files afterwards.